We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The icons in @tabler/icons-react don't seem to match the exported type Icon. Typescript shows an error like this:
@tabler/icons-react
Icon
TS2322: Type ForwardRefExoticComponent<Omit<IconProps, "ref"> & RefAttributes<Icon>> is not assignable to type Icon
Here I created an example on codesandbox. You can see the error in App.tsx on line 4. https://codesandbox.io/p/sandbox/gracious-fast-t362lv?file=%2Fsrc%2FApp.tsx
App.tsx
The text was updated successfully, but these errors were encountered:
Maybe related to #1035 (which contains a possible workaround) 🤔
Sorry, something went wrong.
Thank you @CHE1RON. I also created my custom type as a workaround. But getting rid of it, and using the type from the package would be easier :)
Would you be willing to share your workaround? I experienced some issue in v3.3.0 and could give it a try 😉
Of course. I use this one:
import { Icon, IconProps } from "@tabler/icons-react"; import { ForwardRefExoticComponent, RefAttributes } from "react"; export type TablerIcon = ForwardRefExoticComponent<Omit<IconProps, "ref"> & RefAttributes<Icon>>;
No branches or pull requests
The icons in
@tabler/icons-react
don't seem to match the exported typeIcon
. Typescript shows an error like this:Here I created an example on codesandbox. You can see the error in
App.tsx
on line 4. https://codesandbox.io/p/sandbox/gracious-fast-t362lv?file=%2Fsrc%2FApp.tsxThe text was updated successfully, but these errors were encountered: