first commit

This commit is contained in:
sajjadtalkhabi
2026-05-13 01:43:05 +03:30
commit d2a577f254
297 changed files with 36274 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
<template>
<component
:is="component"
v-if="component"
class="svg-icon"
:style="iconStyle"
aria-hidden="true"
focusable="false"
/>
</template>
<script setup>
import { computed } from 'vue'
import { iconRegistry } from '@/components/icons/registry'
const props = defineProps({
name: { type: String, required: true },
size: { type: [String, Number], default: '1.25rem' },
color: { type: String, default: 'currentColor' },
})
const component = computed(() => {
const c = iconRegistry[props.name]
if (!c && import.meta.env.DEV) {
console.warn(`[SvgIcon] unknown icon "${props.name}"`)
}
return c
})
const sizeValue = computed(() => (typeof props.size === 'number' ? `${props.size}px` : props.size))
const iconStyle = computed(() => ({
width: sizeValue.value,
height: sizeValue.value,
color: props.color,
flexShrink: 0,
}))
</script>
<style lang="scss" scoped>
.svg-icon {
display: inline-block;
vertical-align: middle;
fill: currentcolor;
}
</style>