Closed tsolutionsx closed 3 months ago
Preact core leverages class
rather than className
, when you are using compat
className
will work however, this looks to be erroring because there is some aliasing going on in your TypeScript types as normally the compat intrinsicAttributes should contain className as well. You might need to check how your declaration merging is going.
Fwiw, it looks like both React as well as Preact intrinsicAttributes
only contain the key property so not sure how they are adding this on top.
Posted this on Slack too, but...
Doesn't look like it's a vallid issue. react-icons
don't seem to take a className
prop: https://github.com/react-icons/react-icons?tab=readme-ov-file#adjustment-css
Posted this on Slack too, but...
Doesn't look like it's a vallid issue.
react-icons
don't seem to take aclassName
prop: https://github.com/react-icons/react-icons?tab=readme-ov-file#adjustment-css
but I used react-icons with className
in other react project.
Have you tried checking whether that previous project had non-up-to-date versions of things? That being said our minimum requirement is a reproduction, you are also duplicating issues as you are asking for help on both Slack as well as GitHub. We can't help you on both mediums as you are just duplicating effort, I'll close this one as it doesn't suffice with our minimum requirements and we can continue this conversation on slack.
I would also guess you're using different versions, as, per those docs I linked, react-icons
changed this in some version.
For the current setup anyhow, MdDeleteForever
is of IconType
and IconType
doesn't take a className
prop
Dear Support Team. How are you ?
I hope you help me about my problem. now I am working with tailwindCSS with React-Icons in Preact Project. but if I am going to use React-Icons, there are happening any mistake like attached Image.
How can I use tailwindcss with react-icons ?
I hope you help me please.
thanks