feat(Icon)!: migrate from @egoist/tailwindcss-icons to new @nuxt/icon (#1789)

This commit is contained in:
Benjamin Canac
2024-06-24 12:46:41 +02:00
committed by GitHub
parent bfa2e707d8
commit c904604c23
31 changed files with 110 additions and 259 deletions

View File

@@ -1,33 +0,0 @@
<template>
<Icon v-if="dynamic" :name="name" />
<span v-else :class="name" />
</template>
<script lang="ts">
import { defineComponent, computed } from 'vue'
import { useAppConfig } from '#imports'
export default defineComponent({
props: {
name: {
type: String,
required: true
},
dynamic: {
type: Boolean,
default: false
}
},
setup (props) {
const appConfig = useAppConfig()
// @ts-ignore
const dynamic = computed(() => props.dynamic || appConfig.ui?.icons?.dynamic)
return {
// eslint-disable-next-line vue/no-dupe-keys
dynamic
}
}
})
</script>