UNPKG

883 BTypeScriptView Raw
1import * as React from "react";
2import { BoxProps } from "../Box";
3import { IAvatar } from "../Avatar";
4import { Omit } from "../common-types";
5
6interface IMoreIndicator {
7 size?: IAvatar["size"];
8 label: React.ReactNode;
9}
10
11interface IAvatarGroup {
12 /**
13 * The size of the avatar group.
14 */
15 size?: IAvatar["size"];
16 /**
17 * The children of the avatar group.
18 *
19 * Ideally should be `Avatar` and `MoreIndicator` components
20 */
21 children: React.ReactNode;
22 /**
23 * The space between the avatars in the group.
24 */
25 spacing?: BoxProps["marginLeft"];
26 /**
27 * The maximum number of visible avatars
28 */
29 max?: number;
30}
31
32export type AvatarGroupProps = IAvatarGroup & Omit<BoxProps, "size">;
33/**
34 * AvatarGroup is a wrapper to render a collection of evenly spaced avatars.
35 */
36declare const AvatarGroup: React.FC<AvatarGroupProps>;
37
38export default AvatarGroup;