From f9610283b27957b90c698a76507eac9cd373fdba Mon Sep 17 00:00:00 2001 From: Patrick Naughton Date: Tue, 30 Apr 2024 13:14:07 -0700 Subject: [PATCH] add TablerIcon type (#1058) --- packages/icons-react/src/tabler-icons-react.ts | 2 +- packages/icons-react/src/types.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/icons-react/src/tabler-icons-react.ts b/packages/icons-react/src/tabler-icons-react.ts index 36d592bc2..6821ed129 100644 --- a/packages/icons-react/src/tabler-icons-react.ts +++ b/packages/icons-react/src/tabler-icons-react.ts @@ -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'; diff --git a/packages/icons-react/src/types.ts b/packages/icons-react/src/types.ts index ee64d636c..2960aa816 100644 --- a/packages/icons-react/src/types.ts +++ b/packages/icons-react/src/types.ts @@ -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][]; @@ -10,3 +10,5 @@ export interface IconProps extends Partial, ' } export type Icon = FunctionComponent; + +export type TablerIcon = ForwardRefExoticComponent & RefAttributes>;