clarification on how to use svg in native#5647
clarification on how to use svg in native#5647jasonteunissen wants to merge 1 commit intomendix:developmentfrom
Conversation
clarification on how to use svg in native
|
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. |
|
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. |
|
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? |
| ## 4 Styling SVGs | ||
|
|
||
| You might want to change certain colors in your SVG, for example when adding an image. Mendix allows you to do this by setting the `fill` and `stroke` properties in image's styling. These properties will then be applied to *all* the elements inside the SVG that do not have these properties. | ||
| You might want to change certain colors in your SVG, for example when adding an icon. Mendix allows you to do this by setting the `fill` and `stroke` properties in image's styling of the .js. These properties will then be applied to *all* the elements inside the SVG that do not have these properties. |
There was a problem hiding this comment.
SVGs can also be used for other things (not only icon) so we should not change this here.
There was a problem hiding this comment.
Also styling of the .js seems wrong - we are not styling javascript.
clarification on how to use svg in native