UNPKG

@trail-ui/react

Version:
39 lines (36 loc) 1.24 kB
import * as react from 'react'; import { HTMLAttributes, ReactNode } from 'react'; import { AvatarProps } from './avatar.js'; import '@trail-ui/theme'; import 'react-aria-components'; interface AvatarGroupProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>, Partial<Pick<AvatarProps, 'size' | 'color' | 'radius' | 'isDisabled' | 'isBordered'>> { elementType?: string; /** * Whether the avatars should be displayed in a grid */ isGrid?: boolean; /** * The maximum number of visible avatars * @default 5 */ max?: number; /** * Control the number of avatar not visible */ total?: number; /** * This allows you to render a custom count component. */ renderCount?: (count: number) => ReactNode; } type AvatarContextValue = { isInGroup?: boolean; size?: AvatarProps['size']; color?: AvatarProps['color']; radius?: AvatarProps['radius']; isGrid?: boolean; isBordered?: AvatarProps['isBordered']; isDisabled?: AvatarProps['isDisabled']; }; declare const _AvatarGroup: react.ForwardRefExoticComponent<AvatarGroupProps & react.RefAttributes<HTMLDivElement>>; export { AvatarContextValue, _AvatarGroup as AvatarGroup, AvatarGroupProps };