mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 16:38:20 +01:00
25 lines
572 B
Vue
25 lines
572 B
Vue
|
|
<script setup lang="ts">
|
||
|
|
import { cn } from "@/lib/utils";
|
||
|
|
import { AvatarRoot } from "radix-vue";
|
||
|
|
import type { HTMLAttributes } from "vue";
|
||
|
|
import { type AvatarVariants, avatarVariant } 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>
|