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

Unique IDs for SVGs #186

Open
tiiavalt opened this issue Apr 22, 2021 · 0 comments · Fixed by #189
Open

Unique IDs for SVGs #186

tiiavalt opened this issue Apr 22, 2021 · 0 comments · Fixed by #189
Assignees
Labels
enhancement New feature or request

Comments

@tiiavalt
Copy link
Contributor

tiiavalt commented Apr 22, 2021

Is your feature request related to a problem? Please describe.
Currently our clipPaths have same ID for same SVGs, so same ID can appear on multiple elements in DOM even though IDs should be unique.

Describe the solution you'd like
Create a solution that allows clipPaths ID to change, so there wouldn't be duplicate IDs.


The result

  • Created a new component for SVGs called SvgIcon.jsx
  • The component is used by giving it a parameter called svg with the argument of wanted SVG's name
  • Unique IDs are generated automatically, but one can also be given as parameter
@tiiavalt tiiavalt added the enhancement New feature or request label Apr 22, 2021
@tiiavalt tiiavalt self-assigned this Apr 22, 2021
@tiiavalt tiiavalt linked a pull request Apr 27, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant