import { default as React } from 'react'; import { IconName } from '../Icon'; export type AvatarSize = 16 | 24 | 32 | 40 | 56; export type AvatarVariant = 'circle' | 'square'; export type AvatarSource = { /** * The image URL */ src?: string; /** * The fallback source to display when src is not provided or src is not valid. * If defined, the Avatar component will not fallback on text initials. */ fallbackSrc?: string; /** * The name of the icon to display */ iconName?: never; } | { src?: never; fallbackSrc?: never; iconName: IconName; }; export type AvatarBadgeProps = { /** * Whether the Avatar should be square or circle * @default circle */ variant?: AvatarVariant; /** * The text to display whether src is not provided or src is not valid. The text will be truncated to one character. * Random colors, based on the truncated text, will be assign automatically as background and text color. */ text: string; } & AvatarSource; export type AvatarProps = { /** * className for the element */ className?: string; /** * Whether the Avatar should contains a badge */ badgeProps?: AvatarBadgeProps; /** * Whether the Avatar src should be lazy loaded * @default false */ lazyLoad?: boolean; /** * Specifies the size of the element. * @default m */ size?: AvatarSize; } & AvatarBadgeProps; /** * The Avatar component is used to represent a user or a entity. * It displays a picture or a fallback to initials. * @see https://grapes.spendesk.design/docs/components/avatar * * Avatars bigger than 40 px will automatically get bigger badges */ export declare const Avatar: ({ text, badgeProps, className, size, src, iconName, fallbackSrc, variant, lazyLoad, ...rest }: AvatarProps) => React.JSX.Element; //# sourceMappingURL=Avatar.d.ts.map