UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

56 lines (55 loc) 2 kB
import React, { ReactNode } from 'react'; import { WithHTMLAttributes } from '../../utils/typeHelpers'; import { NJAvatarRootProps } from '../avatar'; import { NJTooltipProps } from '../tooltip/NJTooltip'; export declare const NJAvatarList: React.ForwardRefExoticComponent<import("../../utils/typeHelpers").HTMLAttributesWithoutComponentProps<"div", NJAvatarListOwnProps> & NJAvatarListOwnProps & React.RefAttributes<HTMLDivElement>>; type NJAvatarListOwnProps = { /** * Max number of avatar displayed **/ max?: number; /** * Density of the avatar list **/ density?: 'default' | 'compact'; /** * Avatars scale **/ scale?: NJAvatarRootProps['scale']; /** * Pass `NJAvatars` as children **/ children: ReactNode[]; /** * Avatar's tooltip text. Will appear below the remaining count avatar **/ tooltipText?: NJTooltipProps['text']; /** * Tooltip's position **/ tooltipPosition?: NJTooltipProps['placement']; /** * Function called when the user clicks the remaining count Avatar */ onClick?: React.MouseEventHandler<HTMLDivElement | HTMLAnchorElement | HTMLButtonElement>; /** * Function called when the user mouse enters the remaining count Avatar */ onMouseEnter?: React.MouseEventHandler<HTMLDivElement | HTMLAnchorElement | HTMLButtonElement>; /** * Function called when the user mouse leaves the remaining count Avatar */ onMouseLeave?: React.MouseEventHandler<HTMLDivElement | HTMLAnchorElement | HTMLButtonElement>; /** * Optional additional className **/ className?: string; /** * Label of the "show more" button. * * A function can be used to provide a dynamic label based on the number of remaining avatars in the list. */ showMoreLabel: string | ((elementCount: number) => string); }; export type NJAvatarListProps = WithHTMLAttributes<NJAvatarListOwnProps, 'div'>; export {};