refactor(icons): replace FontAwesome with Tabler Icons
Drop the three @fortawesome/* packages (v5, with a stagnant Vue 2 binding) in favor of @tabler/icons-webfont. The old <awe-icon> wrapper is replaced by <vaquant-icon>, named after the project so future icon-library swaps don't require another rename.
This commit is contained in:
@@ -1,82 +1,15 @@
|
||||
import Vue from 'vue'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faBalanceScale,
|
||||
faBeer,
|
||||
faCheck,
|
||||
faChevronDown,
|
||||
faChevronRight,
|
||||
faCog,
|
||||
faCircle,
|
||||
faClock,
|
||||
faToriiGate,
|
||||
faUtensils,
|
||||
faSubway,
|
||||
faHome,
|
||||
faGift,
|
||||
faDollarSign,
|
||||
faEuroSign,
|
||||
faInbox,
|
||||
faExchangeAlt,
|
||||
faEquals,
|
||||
faGlobeEurope,
|
||||
faMinus,
|
||||
faInfinity,
|
||||
faHandHoldingUsd,
|
||||
faShoppingBasket,
|
||||
faMobile,
|
||||
faMoneyBillWave,
|
||||
faPenSquare,
|
||||
faPlus,
|
||||
faTag,
|
||||
faSignal,
|
||||
faSyncAlt,
|
||||
faUser,
|
||||
faUsers,
|
||||
faUserLock,
|
||||
faTimes,
|
||||
faTheaterMasks,
|
||||
faTrash
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
import '@tabler/icons-webfont/dist/tabler-icons.min.css'
|
||||
|
||||
library.add(
|
||||
faBalanceScale,
|
||||
faBeer,
|
||||
faCheck,
|
||||
faChevronDown,
|
||||
faChevronRight,
|
||||
faCog,
|
||||
faCircle,
|
||||
faClock,
|
||||
faToriiGate,
|
||||
faUtensils,
|
||||
faSubway,
|
||||
faHome,
|
||||
faGift,
|
||||
faDollarSign,
|
||||
faEuroSign,
|
||||
faExchangeAlt,
|
||||
faEquals,
|
||||
faGlobeEurope,
|
||||
faInbox,
|
||||
faMinus,
|
||||
faInfinity,
|
||||
faHandHoldingUsd,
|
||||
faShoppingBasket,
|
||||
faMobile,
|
||||
faMoneyBillWave,
|
||||
faPenSquare,
|
||||
faPlus,
|
||||
faTag,
|
||||
faTrash,
|
||||
faSignal,
|
||||
faSyncAlt,
|
||||
faUser,
|
||||
faUsers,
|
||||
faUserLock,
|
||||
faTimes,
|
||||
faTheaterMasks
|
||||
)
|
||||
|
||||
Vue.component('awe-icon', FontAwesomeIcon)
|
||||
Vue.component('vaquant-icon', {
|
||||
functional: true,
|
||||
props: {
|
||||
icon: { type: String, required: true }
|
||||
},
|
||||
render(h, { props, data }) {
|
||||
return h('i', {
|
||||
...data,
|
||||
class: [`ti ti-${props.icon}`, data.class, data.staticClass]
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user