mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-09 11:12:28 +08:00
Initial commit
This commit is contained in:
21
frontend/src/components/ui/avatar.vue
Normal file
21
frontend/src/components/ui/avatar.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import { AvatarRoot } from 'radix-vue'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface Props {
|
||||
class?: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const avatarClass = computed(() =>
|
||||
cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', props.class)
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AvatarRoot :class="avatarClass">
|
||||
<slot />
|
||||
</AvatarRoot>
|
||||
</template>
|
||||
Reference in New Issue
Block a user