marklawlor / nativewind

React Native utility-first universal design system - powered by Tailwind CSS
https://nativewind.dev
MIT License
4.3k stars 233 forks source link

[V4] Styling using className #857

Open oskarleonard opened 1 month ago

oskarleonard commented 1 month ago

Describe the bug When upgrading from "4.0.22" to latest i can no longer attach a className (using nativewind) to the SVGs

To Reproduce

import DownloadIcon from '~shared/assets/downloadIcon.svg';
<DownloadIcon className="text-white" />

The above works in v4.0.22 but not in "4.0.25" and later version

reinink commented 1 month ago

Yeah, running into the same problem here. Adding this helps a bit:

cssInterop(Svg, { className: 'style' })

But even then some classes like fill-* don't work.