mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 10:20:42 +01:00
feat(Icon)!: migrate from @egoist/tailwindcss-icons to new @nuxt/icon (#1789)
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user