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

Support dynamic icons #4

Closed
remypar5 opened this issue Mar 31, 2023 · 0 comments · Fixed by #13
Closed

Support dynamic icons #4

remypar5 opened this issue Mar 31, 2023 · 0 comments · Fixed by #13
Assignees
Labels
bug Something isn't working

Comments

@remypar5
Copy link
Contributor

remypar5 commented Mar 31, 2023

Icons can be used in Slidev because of Iconify. You can use any icon from any known icon set provided by Icônes.

However, because of the fact that they provide a component per icon (<[set]-[name] />) instead of something like <Icon set="..." name="..." />, it is very difficult to have dynamic icons based on a setting. Currently we have "solved" this issue in <SocialLink /> by introducing <SocialIcon />. This component is basically a large switch which works for now.

We need to find a way to actually solve this issue so we can actually use dynamic elements. We've already looked at VueJS' <component :is="[set]-name]"> element, but al we saw was the <[set]-name] /> element in the DOM. It wasn't treated as a component, so it didn't render an icon.

This issue might fix it, but isn't tried yet.

@remypar5 remypar5 added the bug Something isn't working label Mar 31, 2023
@remypar5 remypar5 self-assigned this Apr 5, 2023
@remypar5 remypar5 linked a pull request Apr 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant