Fix ref types in icons-react (#1394)
`createReactComponent` incorrectly types its `forwardRef` call as reffing an `Icon` instance. That ref is then passed directly to an `svg` element, so instead, it should be typed as `SVGSVGElement`, as this is what will actually be reffed!
This commit is contained in:
parent
0678fad12c
commit
a6f86a05d1
|
|
@ -8,7 +8,7 @@ const createReactComponent = (
|
|||
iconNamePascal: string,
|
||||
iconNode: IconNode,
|
||||
) => {
|
||||
const Component = forwardRef<Icon, IconProps>(
|
||||
const Component = forwardRef<SVGSVGElement, IconProps>(
|
||||
(
|
||||
{ color = 'currentColor', size = 24, stroke = 2, title, className, children, ...rest }: IconProps,
|
||||
ref,
|
||||
|
|
|
|||
Loading…
Reference in New Issue