add TablerIcon type (#1058)
This commit is contained in:
parent
4e5371083c
commit
f9610283b2
|
|
@ -4,4 +4,4 @@ export * as iconsList from './icons-list';
|
|||
export * from './aliases';
|
||||
export { default as createReactComponent } from './createReactComponent';
|
||||
|
||||
export type { Icon, IconNode, IconProps } from './types';
|
||||
export type { Icon, IconNode, IconProps, TablerIcon } from './types';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import { FunctionComponent, ReactSVG } from 'react';
|
||||
import { ForwardRefExoticComponent, FunctionComponent, RefAttributes, ReactSVG } from 'react';
|
||||
export type { ReactNode } from 'react';
|
||||
|
||||
export type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][];
|
||||
|
|
@ -10,3 +10,5 @@ export interface IconProps extends Partial<Omit<React.SVGProps<SVGSVGElement>, '
|
|||
}
|
||||
|
||||
export type Icon = FunctionComponent<IconProps>;
|
||||
|
||||
export type TablerIcon = ForwardRefExoticComponent<Omit<IconProps, "ref"> & RefAttributes<Icon>>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue