Skip to content

Conversation

@NiniGeek
Copy link
Contributor

What it does

Replace viewbox attribute in viewBox

Linear ticket

Resolves DEV-1088

@NiniGeek NiniGeek requested a review from AMoreaux November 18, 2021 09:07
@linear
Copy link

linear bot commented Nov 18, 2021

DEV-1088 [Parser | svg-to-jsx] Improvement

Message from Juul:

Thank you for the fix. It solves most of the issues, including those you didn’t understand. :)

I managed to make it work as I want to, however I feel like svg-to-jsx parser should do one more thing: replace kebab-case props with camelCased ones since former are not valid in React. Currently I have achieved that using replace parser, but it pollutes the config and is far from robust (see attachment).

The other issue is weird: we have two vectors that are not parsed into component correctly, this is "profile_outlined" and "profile_filled". For some reason the content is incorrectly inserted into the .tsx file, even though it looks fine in the output json file (see screenshot below).

PastedGraphic-5.png

vectors.json

.specifyrc.json

@NiniGeek NiniGeek merged commit b118943 into master Nov 18, 2021
@NiniGeek NiniGeek deleted the DEV-1088/fix/improvement-svg-to-jsx branch November 18, 2021 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants