Skip to content

Reserialize Svg #4

Closed Answered by SteamedBread2333
package-lock asked this question in Q&A
Discussion options

You must be logged in to vote

Can you provide the ability to reserialize svg, some requirements will require svg to change color or other

If you need to dynamically set the color of the svg, I think it is better to replace it with a string template.

For example, in react

svgContent.replace(`"#ff0000"`, "{props.red}")

I hope it helps.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by package-lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants