generated from Seekra/repository-template
Add icon component prop to specify the size of the icon
This commit is contained in:
@@ -21,6 +21,10 @@ const props = defineProps({
|
|||||||
name: {
|
name: {
|
||||||
required: true,
|
required: true,
|
||||||
type: String
|
type: String
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 24
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -33,5 +37,5 @@ const Icon = computed(() => icons[`/src/assets/icons/${props.name}.svg`])
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<img :src="Icon" />
|
<img :src="Icon" :style="{ height: `${props.size}px`, width: `${props.size}px` }" />
|
||||||
</template>
|
</template>
|
||||||
Reference in New Issue
Block a user