@atlaskit/avatar-group
Version:
An avatar group displays a number of avatars grouped together in a stack or grid.
134 lines (114 loc) • 3.07 kB
Markdown
<!-- API Report Version: 2.3 -->
> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
- [Main Entry Types](
- [Peer Dependencies](
<!--SECTION START: Main Entry Types-->
```ts
import type { AnalyticsEvent } from '@atlaskit/analytics-next';
import Avatar from '@atlaskit/avatar';
import { AvatarPropTypes } from '@atlaskit/avatar';
import { default as default_2 } from '@atlaskit/avatar';
import { ElementType } from 'react';
import { jsx } from '@emotion/react';
import { MouseEventHandler } from 'react';
import { PositionType } from '@atlaskit/tooltip';
import type { ReactNode } from 'react';
import { SizeType } from '@atlaskit/avatar';
// @public
const AvatarGroup: ({
appearance,
avatar,
borderColor,
boundariesElement,
data,
isTooltipDisabled,
maxCount,
onAvatarClick,
onMoreClick,
overrides,
showMoreButtonProps,
size,
testId,
label,
tooltipPosition,
}: AvatarGroupProps) => jsx.JSX.Element;
export default AvatarGroup;
// @public (undocumented)
interface AvatarGroupItemProps {
// (undocumented)
avatar: AvatarProps;
// (undocumented)
index: number;
// (undocumented)
isActive?: boolean;
// (undocumented)
isHover?: boolean;
// (undocumented)
onAvatarClick?: onAvatarClickHandler;
// (undocumented)
testId?: string;
}
// @public (undocumented)
interface AvatarGroupOverrides {
// (undocumented)
Avatar?: {
render?: (
Component: ElementType<AvatarProps> | typeof default_2,
props: AvatarProps,
index: number,
) => ReactNode;
};
// (undocumented)
AvatarGroupItem?: {
render?: (
Component: ElementType<AvatarGroupItemProps>,
props: AvatarGroupItemProps,
index: number,
) => ReactNode;
};
}
// @public (undocumented)
export interface AvatarGroupProps {
appearance?: 'grid' | 'stack';
avatar?: ElementType<AvatarProps> | typeof Avatar;
borderColor?: string;
boundariesElement?: 'scrollParent' | 'viewport' | 'window';
data: Array<AvatarProps>;
isTooltipDisabled?: boolean;
label?: string;
maxCount?: number;
onAvatarClick?: onAvatarClickHandler;
onMoreClick?: MouseEventHandler;
overrides?: AvatarGroupOverrides;
showMoreButtonProps?: Partial<React.HTMLAttributes<HTMLElement>>;
size?: SizeType;
testId?: string;
tooltipPosition?: Extract<PositionType, 'bottom' | 'top'>;
}
// @public (undocumented)
export type AvatarProps = AvatarPropTypes & {
name: string;
key?: number | string;
};
// @public (undocumented)
type onAvatarClickHandler = (
event: React.MouseEvent,
analyticsEvent: AnalyticsEvent | undefined,
index: number,
) => void;
// (No @packageDocumentation comment for this package)
```
<!--SECTION END: Main Entry Types-->
<!--SECTION START: Peer Dependencies-->
```json
{
"react": "^16.8.0"
}
```
<!--SECTION END: Peer Dependencies-->