obsidian-visualiser/components/standard/Icon.vue

13 lines
392 B
Vue

<script setup lang="ts">
interface Prop
{
icon: string;
width: number;
height: number;
}
defineProps<Prop>();
</script>
<template>
<span :class="$attrs.class" class="inline-block bg-light-100 dark:bg-dark-100 [mask-size:100%] [mask-repeat:no-repeat] [mask-position:center]" :style="`width: ${width}px; height: ${height}px; mask-image: url(/${icon}.svg)`"></span>
</template>