UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

13 lines (12 loc) 504 B
import { inject, provide, computed } from "vue"; export const avatarGroupInjectionKey = Symbol("bitrix24-ui.avatar-group"); export function useAvatarGroup(props) { const avatarGroup = inject(avatarGroupInjectionKey, void 0); const size = computed(() => props.size ?? avatarGroup?.value.size); const color = computed(() => props.color ?? avatarGroup?.value.color); provide(avatarGroupInjectionKey, computed(() => ({ size: size.value, color: color.value }))); return { size, color }; }