Basic design created
This commit is contained in:
17
app/Views/Components/Icon.vue
Normal file
17
app/Views/Components/Icon.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<script setup>
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import * as SolidIcons from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
const props = defineProps({
|
||||
name: { type: String, required: true },
|
||||
})
|
||||
|
||||
if (SolidIcons[`fa${props.name.charAt(0).toUpperCase()}${props.name.slice(1)}`]) {
|
||||
library.add(SolidIcons[`fa${props.name.charAt(0).toUpperCase()}${props.name.slice(1)}`])
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<font-awesome-icon :icon="name" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user