feat(Icon): switch to nuxt-icon with dynamic prop or app config (#862)

This commit is contained in:
Benjamin Canac
2023-11-06 18:27:14 +01:00
committed by GitHub
parent 196e9ac7d4
commit c601fc6c55
5 changed files with 66 additions and 531 deletions

View File

@@ -1,15 +1,22 @@
<template>
<span :class="name" />
<Icon v-if="dynamic" :name="name" />
<span v-else :class="name" />
</template>
<script lang="ts">
import { defineComponent } from 'vue'
// @ts-expect-error
import appConfig from '#build/app.config'
export default defineComponent({
props: {
name: {
type: String,
required: true
},
dynamic: {
type: Boolean,
default: () => !!appConfig.ui?.icons?.dynamic
}
}
})