fix: minor fixes on styling and UI related stuff
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
const iconAliases: Record<string, string> = {
|
||||
'it-bell': 'it-info-circle',
|
||||
'it-grid': 'it-list',
|
||||
'it-history': 'it-clock',
|
||||
'it-home': 'it-pa',
|
||||
'it-image': 'it-file-image',
|
||||
'it-location': 'it-map-marker-circle',
|
||||
'it-map': 'it-map-marker-circle',
|
||||
'it-piu': 'it-plus',
|
||||
'it-star': 'it-star-full',
|
||||
'it-write': 'it-pencil',
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
name: string
|
||||
size?: 'xs' | 'sm' | 'lg' | 'xl'
|
||||
color?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'white'
|
||||
}>()
|
||||
|
||||
const resolvedName = computed(() => iconAliases[props.name] || props.name)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -15,6 +30,6 @@ defineProps<{
|
||||
]"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<use :href="`/sprites.svg#${name}`"></use>
|
||||
<use :href="`/sprites.svg#${resolvedName}`"></use>
|
||||
</svg>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user