mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 16:38:20 +01:00
26 lines
622 B
Vue
26 lines
622 B
Vue
<script setup lang="ts">
|
|
import { AvatarFallback, type AvatarFallbackProps } from "reka-ui";
|
|
import { computed, type HTMLAttributes } from "vue";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
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', props.class)"
|
|
>
|
|
<slot />
|
|
</AvatarFallback>
|
|
</template>
|