Add icon component prop to specify the size of the icon

This commit is contained in:
2026-05-23 16:13:40 +02:00
parent bac689d87c
commit 6a141cff58
+5 -1
View File
@@ -21,6 +21,10 @@ const props = defineProps({
name: {
required: true,
type: String
},
size: {
type: [Number, String],
default: 24
}
})
@@ -33,5 +37,5 @@ const Icon = computed(() => icons[`/src/assets/icons/${props.name}.svg`])
</script>
<template>
<img :src="Icon" />
<img :src="Icon" :style="{ height: `${props.size}px`, width: `${props.size}px` }" />
</template>