1 | import { BeforeEach, EvalScripts } from '@tanem/svg-injector';
|
2 | import * as React from 'react';
|
3 | interface BaseProps {
|
4 | afterInjection?: (svg: SVGSVGElement) => void;
|
5 | beforeInjection?: BeforeEach;
|
6 | desc?: string;
|
7 | evalScripts?: EvalScripts;
|
8 | fallback?: React.ElementType;
|
9 | httpRequestWithCredentials?: boolean;
|
10 | loading?: React.ElementType;
|
11 | onError?: (error: unknown) => void;
|
12 | renumerateIRIElements?: boolean;
|
13 | src: string;
|
14 | title?: string;
|
15 | useRequestCache?: boolean;
|
16 | wrapper?: 'div' | 'span' | 'svg';
|
17 | }
|
18 | type HTMLWrapperType = HTMLSpanElement | HTMLDivElement;
|
19 | type SVGWrapperType = SVGSVGElement;
|
20 | export type WrapperType = HTMLWrapperType | SVGWrapperType;
|
21 | export type Props = BaseProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLWrapperType>, HTMLWrapperType> & React.SVGProps<SVGWrapperType>;
|
22 | export interface State {
|
23 | hasError: boolean;
|
24 | isLoading: boolean;
|
25 | }
|
26 | export {};
|