antfu-collective / icones

⚡️ Icon Explorer with Instant searching, powered by Iconify
https://icones.js.org
MIT License
4.93k stars 238 forks source link

Qwik some properties use a kebab-case #320

Open dejurin opened 1 month ago

dejurin commented 1 month ago

Additional context

For example: stop-color insted stopColor.

Screenshot 2024-05-27 at 17 53 55
cyberalien commented 1 month ago

I wonder, why did you get error for stopColor, but not for gradientTransform few lines above it?

dejurin commented 1 month ago

For example, you can see for yourself by looking at an example of how to use SVG <stop offset="1" stop-color="#ca8a04" /> here https://github.com/fabian-hiller/valibot/blob/main/website/src/icons/LogoIcon.tsx

Types of Qwik

Screenshot 2024-05-27 at 18 30 19
cyberalien commented 1 month ago

Forgot that gradientTransform is always camel case.

Thanks for screenshot, now I see what's the issue. React JSX uses camelCase for everything, including stopColor, Qwik works with unmodified SVG.

So issue here is React JSX transforms should not be applied to Qwik code samples.

dejurin commented 1 month ago

Forgot that gradientTransform is always camel case.

Thanks for screenshot, now I see what's the issue. React JSX uses camelCase for everything, including stopColor, Qwik works with unmodified SVG.

So issue here is React JSX transforms should not be applied to Qwik code samples.

Yep, Qwik use more natively properties. For example in React you use className in Qwik you use class .

antfu commented 1 month ago

PR welcome to fix it :)