UNPKG

@sumcode/svgify

Version:

A lightweight React component designed to dynamically render and style SVG icons.

19 lines (18 loc) 642 B
import { AxiosResponse } from 'axios'; import { default as React, ReactNode } from 'react'; interface SvgifyContextType { version: number; clearForOldVersion: boolean; base_path?: string; FetchIcon?: (IconName: string, timed?: boolean | undefined) => Promise<AxiosResponse<unknown, unknown>>; } type SvgifyProviderProps = Optional<SvgifyContextType> & { children: ReactNode; base_path?: string; }; type Optional<TYPE> = { [props in keyof TYPE]+?: TYPE[props]; }; declare const Svgifier: React.FC<SvgifyProviderProps>; declare const useSvgifyContext: () => SvgifyContextType; export { Svgifier, useSvgifyContext };