Files
litlyx/dashboard/components/ui/avatar/AvatarFallback.vue
2025-11-28 16:49:20 +01:00

24 lines
638 B
Vue

<script setup lang="ts">
import { cn } from '@/lib/utils'
import { AvatarFallback, type AvatarFallbackProps } from 'reka-ui'
import { computed, type HTMLAttributes } from 'vue'
const props = defineProps<AvatarFallbackProps & { class?: HTMLAttributes['class'] }>()
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props
return delegated
})
</script>
<template>
<AvatarFallback
data-slot="avatar-fallback"
v-bind="delegatedProps"
:class="cn('bg-gray-100 flex size-full items-center justify-center rounded-full dark:bg-gray-800', props.class)"
>
<slot />
</AvatarFallback>
</template>