feat(AvatarGroup): new component (#71)

Co-authored-by: Romain Hamel <romain@boilr.io>
This commit is contained in:
Benjamin Canac
2024-04-26 17:04:49 +02:00
committed by GitHub
parent 26bfdfc54d
commit def5f7c10b
14 changed files with 280 additions and 10 deletions

View File

@@ -28,19 +28,24 @@ export interface ChipSlots {
</script>
<script setup lang="ts">
import { computed } from 'vue'
import { computed, provide } from 'vue'
import { Primitive } from 'radix-vue'
import { useAvatarGroup } from '#imports'
const show = defineModel<boolean>('show', { default: true })
const props = withDefaults(defineProps<ChipProps>(), { as: 'div' })
defineSlots<ChipSlots>()
const { size } = useAvatarGroup(props)
const ui = computed(() => tv({ extend: chip, slots: props.ui })({
color: props.color,
size: props.size,
size: size.value,
position: props.position,
inset: props.inset
}))
provide('avatar-size', size)
</script>
<template>