fix(Chip): size injection (#105)

This commit is contained in:
Romain Hamel
2024-05-13 10:15:24 +02:00
committed by GitHub
parent c00ec5e2f2
commit 8baee1292f

View File

@@ -7,7 +7,7 @@ export function useAvatarGroup(props: { size: AvatarGroupProps['size'] }) {
const injectedSize = inject(avatarGroupInjectionKey, undefined)
const size = computed(() => props.size ?? injectedSize?.value.size)
provide('avatar-size', size)
provide(avatarGroupInjectionKey, computed(() => ({ size: size.value })))
return {
size