tabler / tabler-icons

A set of over 5700 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
18.31k stars 917 forks source link

Dynamic usage of icons don`t accept any props in 3.2.x #1090

Closed diego-menezes closed 3 months ago

diego-menezes commented 7 months ago

In menu on my app i pass a icon on prop and declare dinamicaly like above

const acao = {
url: "#",
nome:  "Home"
icone: IconHome
}

    <NavLink
.....
      component={Link}
      href={acao.url}
      label={acao.nome}
      leftSection={<acao.icone size="2rem" stroke={1.5}/>}
....
    />

But now in 3.2 i got this error because size, stroke or any other props.

TS2322: Type { size: string; stroke: number; } is not assignable to type IntrinsicAttributes & RefAttributes<Icon>
Property size does not exist on type IntrinsicAttributes & RefAttributes<Icon>

but work on npm run dev, but don`t on start...

Fedec96 commented 7 months ago

I think this might be a duplicate of #1077 Should be fixed when #1078 gets merged

BG-Software-BG commented 3 months ago

1078 is already merged.

Is this issue resolved with that?