Skip to content
New issue

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

Qwik some properties use a kebab-case #320

Open
dejurin opened this issue May 27, 2024 · 5 comments
Open

Qwik some properties use a kebab-case #320

dejurin opened this issue May 27, 2024 · 5 comments

Comments

@dejurin
Copy link

dejurin commented May 27, 2024

Additional context

For example: stop-color insted stopColor.

Screenshot 2024-05-27 at 17 53 55
@cyberalien
Copy link
Collaborator

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

@dejurin
Copy link
Author

dejurin commented May 27, 2024

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

@dejurin dejurin changed the title Qwik properties use a kebab-case Qwik some properties use a kebab-case May 27, 2024
@cyberalien
Copy link
Collaborator

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
Copy link
Author

dejurin commented May 27, 2024

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
Copy link
Member

antfu commented May 31, 2024

PR welcome to fix it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants