docs icon indicating copy to clipboard operation
docs copied to clipboard

clarification on how to use svg in native

Open jasonteunissen opened this issue 2 years ago • 3 comments

clarification on how to use svg in native

jasonteunissen avatar Feb 15 '23 18:02 jasonteunissen

Hi Jason. Can you give me a little context for your rationale behind these changes? I'm especially curious about the longer code snippet you introduce and then pare back.

ConnorLand avatar Feb 16 '23 09:02 ConnorLand

When trying to build this out, I had to troubleshoot what worked and what not because there was no clear "before and after" code that was exported from figma, to code that worked in reactnative.

I hope that showing a before and after will help people understand what elements can be removed from the code.

also having the stroke class still in there in the example confused me.

jasonteunissen avatar Feb 16 '23 19:02 jasonteunissen

Thanks for the suggestion! I like that you want to make the example more realistic by using a Figma export. Maybe we can extend that and use something more interesting than just a rectangle that actually makes good use of preserving fill/stroke somewhere?

Also could you explain the other changes you made? Why change the viewBox? Why remove the other svg attributes?

jdiehl avatar Feb 17 '23 13:02 jdiehl