mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-07 10:12:27 +08:00
Initial commit
This commit is contained in:
24
frontend/src/components/ui/avatar-fallback.vue
Normal file
24
frontend/src/components/ui/avatar-fallback.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user