added avatar component
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user