react-inlinesvg
- Version 4.1.8
- Published
- 132 kB
- 1 dependency
- MIT license
Install
npm i react-inlinesvg
yarn add react-inlinesvg
pnpm add react-inlinesvg
Overview
An SVG loader for React
Index
Variables
variable cacheStore
let cacheStore: CacheStore;
variable STATUS
const STATUS: { readonly IDLE: 'idle'; readonly LOADING: 'loading'; readonly LOADED: 'loaded'; readonly FAILED: 'failed'; readonly READY: 'ready'; readonly UNSUPPORTED: 'unsupported';};
Functions
Interfaces
interface FetchError
interface FetchError extends Error {}
interface State
interface State {}
interface StorageItem
interface StorageItem {}
Type Aliases
type ErrorCallback
type ErrorCallback = (error: Error | FetchError) => void;
type LoadCallback
type LoadCallback = (src: string, isCached: boolean) => void;
type PlainObject
type PlainObject<T = unknown> = Record<string, T>;
type PreProcessorCallback
type PreProcessorCallback = (code: string) => string;
type Props
type Props = Simplify< Omit<SVGProps<SVGElement>, 'onLoad' | 'onError' | 'ref'> & { baseURL?: string; cacheRequests?: boolean; children?: ReactNode; description?: string; fetchOptions?: RequestInit; innerRef?: RefObject<SVGElement | null>; loader?: ReactNode; onError?: ErrorCallback; onLoad?: LoadCallback; preProcessor?: PreProcessorCallback; src: string; title?: string | null; uniqueHash?: string; uniquifyIDs?: boolean; }>;
type Simplify
type Simplify<T> = { [KeyType in keyof T]: T[KeyType];} & {};
type Status
type Status = (typeof STATUS)[keyof typeof STATUS];
Package Files (1)
Dependencies (1)
Dev Dependencies (29)
- @arethetypeswrong/cli
- @gilbarbara/eslint-config
- @gilbarbara/prettier-config
- @gilbarbara/tsconfig
- @size-limit/preset-small-lib
- @testing-library/jest-dom
- @testing-library/react
- @types/node
- @types/react
- @types/react-dom
- @vitejs/plugin-react
- @vitest/coverage-v8
- browser-cache-mock
- del-cli
- fix-tsup-cjs
- http-server
- husky
- jest-extended
- jsdom
- react
- react-dom
- repo-tools
- size-limit
- start-server-and-test
- ts-node
- tsup
- typescript
- vitest
- vitest-fetch-mock
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-inlinesvg
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-inlinesvg)
- HTML<a href="https://www.jsdocs.io/package/react-inlinesvg"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2699 ms. - Missing or incorrect documentation? Open an issue for this package.