gridaco / code

Design to Code Engine
https://grida.co/code
Apache License 2.0
225 stars 30 forks source link

kebab-case SVG Properties on JSX should be transformed to camelCase (e.g. `clip-path` to `clipPath`) #181

Open softmarshmallow opened 1 year ago

softmarshmallow commented 1 year ago

Using the raw svg data in JSX (react) will throw below runtime warning.

Warning: Invalid DOM property `clip-path`. Did you mean `clipPath`?

If the svg is inlined, it is a good practice to alter the property names to react tolerant keywords.

TODO