-
Notifications
You must be signed in to change notification settings - Fork 59
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
Doesn't take into account className
#125
Comments
Hey @deadcoder0904, Make sense as <svg class="w-4 h-4 fill-current text-red-500" ... Work as it should. |
@balajmarius I'm using React. In React, we don't use There are some other attributes that collide as well like So it's totally valid in React. Not sure if you want to add this one as its framework-specific :) |
Also, just tried <svg
className={`${!menuOpen ? 'hidden' : 'block'} h-6 w-6`}
stroke="currentColor"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg> And it gives an error |
Yes, it should throw an error. What I'm trying to say it's that your SVG is invalid, the SVG2JSX takes valid SVG and outputs JSX. This is not valid SVG |
Cool, next time I'd add the |
The UX is incredible but it doesn't take into account
className
For example,
gets converted to
Notice, the missing
className
propertyThe text was updated successfully, but these errors were encountered: