Bundle icons into a single file.

This commit is contained in:
2026-01-30 19:12:27 +00:00
parent 4f39875786
commit be69164c8f
6 changed files with 22 additions and 10 deletions
+4 -6
View File
@@ -1,18 +1,16 @@
<template>
<button class="action-button">
<component :is="icon" />
<component :is="icons[name]" />
<slot></slot>
</button>
</template>
<script setup lang="ts">
import { defineAsyncComponent } from 'vue'
import { icons, type IconName } from '@/assets/svg'
const props = defineProps<{
name: string
defineProps<{
name: IconName
}>()
const icon = defineAsyncComponent(() => import(`@/assets/svg/${props.name}.svg`))
</script>
<style>