Support font-awesome #121
-
Hi, how can I use font-awesome in stories? I have plugin which use icon, but on preview screen i don't see rendered icon. Console don't send any error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok I found answear. `import "./lib-components/assets/css/variables.css"; // Import global CSS import { defineSetupVue3 } from "histoire/client"; import { createI18n } from "vue-i18n"; import { library.add(fas); export const setupVue3 = defineSetupVue3(({ app, story, variant }) => { app.use(i18n); |
Beta Was this translation helpful? Give feedback.
Ok I found answear.
`import "./lib-components/assets/css/variables.css"; // Import global CSS
import { defineSetupVue3 } from "histoire/client";
import { createI18n } from "vue-i18n";
import {
FontAwesomeIcon,
FontAwesomeLayers
} from "@fortawesome/vue-fontawesome";
import { library } from "@fortawesome/fontawesome-svg-core";
import { fas } from "@fortawesome/free-solid-svg-icons";
import { far } from "@fortawesome/free-regular-svg-icons";
import { fas as fasPro } from "@fortawesome/pro-solid-svg-icons";
import { far as farPro } from "@fortawesome/pro-regular-svg-icons";
library.add(fas);
library.add(fasPro);
library.add(far);
library.add(farPro);
export const setupVue3 = defineSetupVue3(…