UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

79 lines (78 loc) 2.13 kB
import React from 'react'; import { AvatarSizes, AvatarVariants } from './Avatar'; import type { SpacingProps } from '../../shared/types'; import type { SkeletonShow } from '../skeleton/Skeleton'; export interface AvatarGroupProps extends Omit<React.HTMLProps<HTMLElement>, 'size' | 'label'> { /** * Label to describe the avatar group * Default: null */ label: React.ReactNode; /** * Custom className on the component root * Default: null */ className?: string; /** * Number of max displayed elements, including the "elements hidden text (+x)". * Default: 4 */ maxElements?: number; /** * The avatars to group. * Default: null */ children?: React.ReactNode; /** * The size of the Avatars, and "elements hidden text (+x)". * Default: medium. */ size?: AvatarSizes; /** * The variant of the Avatars. * Default: primary. */ variant?: AvatarVariants; /** * Skeleton should be applied when loading content * Default: false */ skeleton?: SkeletonShow; /** * Define a custom background color for the Avatars, instead of a variant. Use a Eufemia color. * Default: undefined */ backgroundColor?: string; /** * Define a custom color to compliment the backgroundColor for the Avatars. Use a Eufemia color. * Default: undefined */ color?: string; } export declare const defaultProps: { label: any; className: any; maxElements: number; size: string; children: any; variant: string; skeleton: boolean; }; export declare const AvatarGroupContext: React.Context<any>; declare const AvatarGroup: { (localProps: AvatarGroupProps & SpacingProps): import("react/jsx-runtime").JSX.Element; _supportsSpacingProps: boolean; }; export interface ElementsHiddenProps { /** * The avatars to group. * Default: null */ children?: React.ReactNode; /** * The size of the "elements hidden text (+x)". * Default: medium. */ size?: AvatarSizes; } export default AvatarGroup;