@octopusdeploy/design-system-components
Version:
The design systems component library.
27 lines (26 loc) • 1.4 kB
TypeScript
import type React from "react";
import type { AvatarProps } from "../Avatar";
export type AvatarStackItemProps = Omit<AvatarProps, "size">;
export interface AvatarStackProps {
/** Array of avatar props to render in the stack (size will be set by AvatarStack, title is required for AvatarStack) */
avatars: Array<AvatarStackItemProps & {
shape: "circle";
}> | Array<AvatarStackItemProps & {
shape: "rounded";
}>;
/** The URL to navigate to when the avatar stack is clicked */
href?: string;
}
/**
* AvatarStack Component
* Displays multiple avatars in a horizontal stack with overlap.
* Limits the number of rendered avatars to 3.
* Automatically detects avatar types and ensures consistency (either all user OR all entity types, never both).
* Note: The title prop is required for all avatars in the stack to ensure proper accessibility.
*
* @param {AvatarProps} props - The properties for the avatar stack component.
* @param {AvatarProps[]} props.avatars - Array of avatar props to render in the stack (size will be set by AvatarStack, title is required for AvatarStack usage).
* @param {string} props.href - The URL to navigate to when the avatar stack is clicked.
* @returns {React.ReactElement} A React element representing the avatar stack.
*/
export declare function AvatarStack({ avatars, href }: AvatarStackProps): React.ReactElement;