frontend/components/ui/avatar/AvatarFallback.vue

26 lines
635 B
Vue
Raw Normal View History

<script setup lang="ts">
import { cn } from "@/lib/utils";
import { AvatarFallback, type AvatarFallbackProps } from "reka-ui";
import { type HTMLAttributes, computed } 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-muted flex size-full items-center justify-center rounded-full', props.class)"
>
<slot />
</AvatarFallback>
</template>