@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
22 lines (21 loc) • 1.37 kB
TypeScript
import type { ComputedRef, InjectionKey } from 'vue';
import type { AvatarGroupProps } from '../types';
export declare const avatarGroupInjectionKey: InjectionKey<ComputedRef<{
size: AvatarGroupProps['size'];
color: AvatarGroupProps['color'];
}>>;
/**
* Reads `size` and `color` from a wrapping `<B24AvatarGroup>`.
*
* **Always pass the raw `_props`, never the `useComponentProps` proxy** — the
* fallback `props.size ?? avatarGroup?.value.size` must keep the wrapping group
* winning over `<B24Theme :props>`. To still apply theme defaults on bare avatars,
* fall back to the proxy at the `tv()` call site: `size: size.value ?? props.size` and call color: `color: color.value ?? props.color`.
*/
export declare function useAvatarGroup(props: {
size: AvatarGroupProps['size'];
color: AvatarGroupProps['color'];
}): {
size: ComputedRef<"lg" | "sm" | "md" | "xl" | "3xs" | "2xs" | "xs" | "2xl" | "3xl" | undefined>;
color: ComputedRef<"air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-primary-warning" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "air-primary-no-accent" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost" | undefined>;
};