oh-vue-icons icon indicating copy to clipboard operation
oh-vue-icons copied to clipboard

Icons do not appear on the page

Open reinaldofox opened this issue 1 year ago • 2 comments

In my project with Vite, Vue3/Composition API and Typescript the icons do not appear on the page. Do I need some svg loader?

reinaldofox avatar Jan 23 '24 17:01 reinaldofox

hey i have the same problem (javascript), did you already find any solution?

alfaruqii avatar Feb 08 '24 11:02 alfaruqii

hey i have the same problem (javascript), did you already find any solution?

Yep. I did it this way. In my components I did local import:

import { OhVueIcon as Vicon, addIcons } from "oh-vue-icons"
import { FaFlag } from "oh-vue-icons/icons"
addIcons(FaFlag)

And in the templates, just instantiate the icons you imported.

<template>
  <Vicon name="fa-flag"  />
</template>

This way it worked for me.

reinaldofox avatar Feb 11 '24 18:02 reinaldofox