advent22/ui/src/plugins/fontawesome.ts

21 lines
567 B
TypeScript
Raw Normal View History

2023-09-07 01:17:14 +00:00
import { App, Plugin } from "vue";
2023-01-20 00:41:15 +00:00
/* import the fontawesome core */
2023-09-07 01:17:14 +00:00
import { library } from "@fortawesome/fontawesome-svg-core";
2023-01-20 00:41:15 +00:00
/* import specific icons */
2023-09-07 01:17:14 +00:00
import { fab } from "@fortawesome/free-brands-svg-icons";
import { fas } from "@fortawesome/free-solid-svg-icons";
2023-01-20 00:41:15 +00:00
/* add icons to the library */
library.add(fas, fab);
/* import font awesome icon component */
2023-09-07 01:17:14 +00:00
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
2023-01-20 00:41:15 +00:00
export const FontAwesomePlugin: Plugin = {
install(app: App) {
2023-09-07 01:17:14 +00:00
app.component("font-awesome-icon", FontAwesomeIcon);
},
};