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

change icon dynmically from database #96

Open
abdotigami opened this issue Oct 15, 2021 · 2 comments
Open

change icon dynmically from database #96

abdotigami opened this issue Oct 15, 2021 · 2 comments

Comments

@abdotigami
Copy link

Icon.{variable} can i do this

@xavimb
Copy link

xavimb commented Jan 25, 2022

I guess if you use the original feather icons library you can replace the href parameter in the SVG to point to the icon you want:

<svg class="feather">
  <use href={`path/to/dist/feather-sprite.svg#{variable}`}/>
</svg>

@akulsr0
Copy link

akulsr0 commented Mar 26, 2022

@abdotigami Incase you want something like following:

Preview: https://fzqqlu.csb.app/
Sandbox Link: https://codesandbox.io/s/smoosh-https-fzqqlu

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

3 participants