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:
Shane Friedman 2025-12-14 07:04:30 -05:00 committed by GitHub
parent 0678fad12c
commit a6f86a05d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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,