UNPKG

@clubmed/trident-icons

Version:

Shared ClubMed Icons library

46 lines (45 loc) 1.77 kB
import { FunctionComponent, PropsWithChildren } from 'react'; import { IconOrientationProps } from '../hooks/useIconOrientation'; import { CSS, Interpolation, SpringValue } from '@react-spring/web'; export interface IconProps extends IconOrientationProps { name: string; type?: string; /** * Width of the icon */ width?: string | null; /** * Color */ color?: string; /** * Additional class names */ className?: string; /** * Additional styles */ style?: { [key: string]: string | number | SpringValue<string> | SpringValue<number> | Interpolation<string, string> | CSS.Properties; }; } export type IconsRegistryValue<Props extends IconProps = IconProps> = IconResolverProps<Props> & { key: string; }; export type IconResolverProps<Props extends IconProps = IconProps> = Props & { name: string; group?: string; withOrientation?: boolean; component: FunctionComponent<Props>; }; export declare const IconTypesRegistry: Map<string, Map<string, IconsRegistryValue<IconProps>>>; export declare function loadIcons<Props extends IconProps = IconProps>(icons: IconResolverProps<Props>[] | IconResolverProps<Props>[][]): Map<string, Map<string, IconsRegistryValue<IconProps>>>; export declare const IconsContext: import('react').Context<{ locale?: string; container: Map<string, Map<string, IconsRegistryValue>>; updateContainer: (_: IconResolverProps[] | IconResolverProps[][]) => void; }>; export declare function IconsProvider<Props extends IconProps = IconProps>({ icons, locale, children, }: PropsWithChildren<{ locale?: string; icons: IconResolverProps<Props>[] | IconResolverProps<Props>[][]; }>): import("react/jsx-runtime").JSX.Element;