You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
580 B
Vue
25 lines
580 B
Vue
<script setup lang="ts">
|
|
import { cn } from '@/lib/utils';
|
|
import { AvatarRoot } from 'radix-vue';
|
|
import type { HTMLAttributes } from 'vue';
|
|
import { avatarVariant, type AvatarVariants } from '.';
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
class?: HTMLAttributes['class'];
|
|
size?: AvatarVariants['size'];
|
|
shape?: AvatarVariants['shape'];
|
|
}>(),
|
|
{
|
|
size: 'sm',
|
|
shape: 'circle',
|
|
},
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<AvatarRoot :class="cn(avatarVariant({ size, shape }), props.class)">
|
|
<slot />
|
|
</AvatarRoot>
|
|
</template>
|