Files
hossein-por-shop/frontend/components/global/Avatar.vue
T
2025-02-04 23:42:42 +03:30

31 lines
699 B
Vue

<script setup lang="ts">
// types
type Props = {
src: string;
alt: string;
};
// props
defineProps<Props>();
</script>
<template>
<AvatarRoot
class="bg-black inline-flex size-[45px] select-none items-center justify-center overflow-hidden rounded-full align-middle"
>
<AvatarImage
class="h-full w-full rounded-[inherit] object-cover"
:src="src"
:alt="alt"
/>
<AvatarFallback
class="text-slate-300 leading-1 flex h-full w-full items-center justify-center bg-white text-sm font-medium"
:delay-ms="600"
>
{{ alt }}
</AvatarFallback>
</AvatarRoot>
</template>