-
Notifications
You must be signed in to change notification settings - Fork 100
Add feature for SVG attributes conversion #136
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
Conversation
Any chance of this getting merged soon ? |
Hi @ritz078 . If you are in a hurry, htmltojsx that corresponds to SVG is released in Scoped Package, so please try using it 😃 |
Sorry, I completely missed this... I'll take a look soon! |
Hi @Daniel15, Thanks ! |
Thanks @tsuyoshiwada . FYI I am using it on https://transform.now.sh/html-to-jsx |
} | ||
output.push(this.toJSXKey(key) + ': ' + this.toJSXValue(this.styles[key])); | ||
} | ||
eachObj(this.styles, function(key, value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have refactored the iteration of the object using the newly created eachObj
helper.
I'm sorry I made a confusing change... 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's totally fine, don't worry @tsuyoshiwada 😄 I was just wondering about why we couldn't just continue to use a regular for
loop here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! It was worried whether it became a meddle, but I am relieved 😃
Released as 0.3.0 😃 |
Hi @Daniel15, Thank you 😄 I checked that I was working. |
Hi, Thank you for useful library 😃
I wanted to convert the attributes of SVG like #135.
However, when I actually convert it I got the following output.
So we added
SVGDOMPropertyConfig
as an attribute mapping target as well asHTMLDOMPropertyConfig
.Related issues