Files
Aether/frontend/src/components/ui/avatar-fallback.vue
2025-12-10 20:52:44 +08:00

25 lines
502 B
Vue

<script setup lang="ts">
import { AvatarFallback as AvatarFallbackPrimitive } from 'radix-vue'
import { cn } from '@/lib/utils'
import { computed } from 'vue'
interface Props {
class?: string
}
const props = defineProps<Props>()
const fallbackClass = computed(() =>
cn(
'flex h-full w-full items-center justify-center rounded-full bg-muted',
props.class
)
)
</script>
<template>
<AvatarFallbackPrimitive :class="fallbackClass">
<slot />
</AvatarFallbackPrimitive>
</template>