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

Possible to import icons dynamically? #878

Closed
cascading-jox opened this issue May 28, 2022 · 1 comment
Closed

Possible to import icons dynamically? #878

cascading-jox opened this issue May 28, 2022 · 1 comment

Comments

@cascading-jox
Copy link

I am trying to render icons depending on strings with the icon names that I initiate the component with. Is it possible to import icons dynamically depending on a configuration set at runtime e.g. from a string? It seems like including fontawesome in a link tag doesn't render <i> tags in web components with their own shadow root (haven't tested without customElements: true).

@RobBrazier
Copy link
Owner

really sorry for the delay in replying - you can handle that in your application, keeping a map of string -> icon data like you're mentioning - the Icon will update when you change the data assigned to it

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

2 participants