Files
daywork/intern-log/src/components/Icon.vue
T

12 lines
361 B
Vue

<script setup lang="ts">
import { computed } from 'vue'
import { ICONS } from './icons'
const props = withDefaults(defineProps<{ name: string; size?: number }>(), { size: 16 })
const html = computed(() => ICONS[props.name] || '')
</script>
<template>
<span class="icon" :style="{ width: size + 'px', height: size + 'px' }" v-html="html"></span>
</template>