@nuxt/ui
Version:
A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
22 lines (21 loc) • 1.03 kB
TypeScript
import type { ComputedRef, InjectionKey } from 'vue';
import type { AvatarGroupProps } from '../components/AvatarGroup.vue';
export declare const avatarGroupInjectionKey: InjectionKey<ComputedRef<{
size: AvatarGroupProps['size'];
color: AvatarGroupProps['color'];
}>>;
/**
* Reads `size` and `color` from a wrapping `<UAvatarGroup>`.
*
* **Always pass the raw `_props`, never the `useComponentProps` proxy** — the
* fallback `props.size ?? avatarGroup?.value.size` must keep the wrapping group
* winning over `<UTheme :props>`. To still apply theme defaults on bare avatars,
* fall back to the proxy at the `tv()` call site: `size: size.value ?? props.size`.
*/
export declare function useAvatarGroup(props: {
size: AvatarGroupProps['size'];
color: AvatarGroupProps['color'];
}): {
size: ComputedRef<"xs" | "sm" | "md" | "lg" | "xl" | "3xs" | "2xs" | "2xl" | "3xl" | undefined>;
color: ComputedRef<"error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined>;
};