mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-03 00:02:28 +08:00
30 lines
532 B
Vue
30 lines
532 B
Vue
<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>(), {
|
|
class: undefined,
|
|
src: undefined,
|
|
alt: ''
|
|
})
|
|
|
|
const imageClass = computed(() =>
|
|
cn('aspect-square h-full w-full', props.class)
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<AvatarImagePrimitive
|
|
:class="imageClass"
|
|
:src="src || ''"
|
|
:alt="alt"
|
|
/>
|
|
</template>
|