yunohost-portal/components/YIcon.vue

25 lines
395 B
Vue
Raw Permalink Normal View History

<script setup lang="ts">
2023-11-14 19:17:04 +01:00
withDefaults(
defineProps<{
name: string
size?: string
}>(),
{
size: '1.5em',
},
)
</script>
<template>
<NuxtIcon :name="name" :style="`--size: ${size}`" />
</template>
<style scoped>
.nuxt-icon :deep(svg) {
/* Do not use `v-bind(size)`, idk why bind is not working */
width: var(--size);
height: var(--size);
display: inline;
}
</style>