import fontawesome api

This commit is contained in:
Chen, Tai-Lin authored and wancat committed 2023-08-01 20:54:05 +08:00
1 parent 5e6cb7be37
commit 06220e6b30
4 files changed
+135 -95

No files matched your search

+40 -1
View File
@@ -2,4 +2,43 @@ import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
createApp(App).mount('#app')
/* import the fontawesome core */
import { library } from '@fortawesome/fontawesome-svg-core'
/* import font awesome icon component */
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
/* import specific icons */
import {
faBarsStaggered,
faArrowLeft,
faList,
faGear,
faTriangleExclamation,
faExpand,
faTerminal,
faArrowRotateLeft,
} from '@fortawesome/free-solid-svg-icons'
import {
faLightbulb,
faCircleQuestion,
faCircleRight,
} from '@fortawesome/free-regular-svg-icons'
/* add icons to the library */
library.add(
faBarsStaggered,
faArrowLeft,
faTriangleExclamation,
faGear,
faExpand,
faList,
faLightbulb,
faCircleQuestion,
faArrowRotateLeft,
faCircleRight,
faTerminal
)
createApp(App).component('font-awesome-icon', FontAwesomeIcon).mount('#app')