Use icons instead of Unicode characters #91

Merged
jakob.scheid merged 13 commits from feature/icons into main 2026-06-01 12:28:35 +02:00
Showing only changes of commit 534734ce9a - Show all commits
+4 -1
View File
@@ -16,6 +16,7 @@ limitations under the License.
<script setup> <script setup>
import { computed } from 'vue'; import { computed } from 'vue';
import { ensureUnit } from '@/utils/cssDimensions';
const props = defineProps({ const props = defineProps({
name: { name: {
@@ -34,8 +35,10 @@ const icons = import.meta.glob('@/assets/icons/*.svg', {
}) })
const Icon = computed(() => icons[`/src/assets/icons/${props.name}.svg`]) const Icon = computed(() => icons[`/src/assets/icons/${props.name}.svg`])
const size = computed(() => ensureUnit(props.size))
</script> </script>
<template> <template>
<img :src="Icon" :style="{ height: `${props.size}px`, width: `${props.size}px` }" /> <img :src="Icon" :style="{ height: `${size}`, width: `${size}` }" />
</template> </template>