Open th0th opened 6 months ago
Maybe related to https://github.com/tabler/tabler-icons/issues/1035 (which contains a possible workaround) 🤔
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 😉
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>>;
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.tsx