import { SizeKeyword } from '../../shared/scales'; import { GlobalProps } from '../../shared/global'; export interface AvatarProps extends GlobalProps { /** * Initials to display in the avatar. */ initials?: string; /** * The URL or path to the image. * * Initials will be rendered as a fallback if `src` is not provided, fails to load or does not load quickly */ src?: string; /** * Invoked when load of provided image completes successfully. * * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload */ onLoad?: () => void; /** * Invoked on load error of provided image. * * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror */ onError?: () => void; /** * Size of the avatar. * * @default 'base' */ size?: SizeKeyword | 'fill'; /** * An alternative text that describes the avatar for the reader * to understand what it is about or identify the user the avatar belongs to. */ alt?: string; }