Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve SVG management and add a Icon component #5

Open
gabrieleAngius opened this issue May 24, 2023 · 0 comments
Open

chore: improve SVG management and add a Icon component #5

gabrieleAngius opened this issue May 24, 2023 · 0 comments

Comments

@gabrieleAngius
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The SVG component exposed by figma widget accept a src prop which should contain an svg string of the form "<svg .... />".
I don't really like passing it directly as a string

Describe the solution you'd like
If possible I'd prefer to import a .svg file and use it a src (need to investigate if it's possible to do it using a svg loader or similar)

Would be also nice to set up a Icon component which takes a name prop and render the related SVG

Describe alternatives you've considered
If is not possible or too tricky to set up a svg loader as proposed above, a simpler solution is to save all svg strings in a map object

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

No branches or pull requests

1 participant