mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-03 08:12:26 +08:00
Initial commit
This commit is contained in:
23
frontend/src/components/ui/avatar-image.vue
Normal file
23
frontend/src/components/ui/avatar-image.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { AvatarImage as AvatarImagePrimitive } from 'radix-vue'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface Props {
|
||||
class?: string
|
||||
src?: string
|
||||
alt: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
alt: ''
|
||||
})
|
||||
|
||||
const imageClass = computed(() =>
|
||||
cn('aspect-square h-full w-full', props.class)
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AvatarImagePrimitive :class="imageClass" :src="src || ''" :alt="alt" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user