1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

perf: migration from font icons to svg icons

This commit is contained in:
2023-09-17 18:49:37 +02:00
parent 9de5f67d18
commit e7bec0aaaf
80 changed files with 2024 additions and 489 deletions

View File

@ -0,0 +1,42 @@
<template>
<SvgIcon
:type="type"
:path="iconPath"
:size="size"
:flip="flip"
:rotate="rotate"
/>
</template>
<script setup lang="ts">
import SvgIcon from '@jamescoyle/vue-icon';
import * as Icons from '@mdi/js';
import { computed, PropType } from 'vue';
const props = defineProps({
iconName: {
type: String,
required: true
},
size: {
type: Number,
default: 48
},
type: {
type: String,
default: () => 'mdi'
},
flip: {
type: String as PropType<'horizontal' | 'vertical' | 'both'>,
default: () => null
},
rotate: {
type: String,
default: () => null
}
});
const iconPath = computed(() => {
return (Icons as {[k:string]: string})[props.iconName];
});
</script>