Closed silveltman closed 1 year ago
Hi, I am interested in use in other components. Is that possible?
I guess that we could use https://github.com/antfu/unplugin-icons for the other languages but it's indeed a bit counter-productive to have both to cover every extension.
You can use the Icon
component in other framework components by utilizing the <slot />
feature.
I will need to give that one a try!
@kissu here is an example using with React. https://stackblitz.com/edit/github-6zni2a?file=src/components/Card.jsx https://stackblitz.com/edit/github-6zni2a?file=src/pages/index.astro
Going to close this since this is possible. Feel free to comment if you're experiencing issues.
Welcome, is there a Vue 3 sample?
@wpplumber Do you have find an example with Vue 3? I've the following problem:
| index.astro
| components
| Slider.vue
| Card.vue
I use a v-for
in Slider and send data of card by props
to Card.
In this card, I would like to add icons but I don't find a solution for that...
Can this be used in components other than .astro? Like .svelte, .vue etc.
I'm getting an error but not sure what the exact reason for this is