UNPKG

901 BTypeScriptView Raw
1import * as React from 'react';
2import type { AvatarSize } from './AvatarContext';
3export interface AvatarProps {
4 /** Shape of avatar, options: `circle`, `square` */
5 shape?: 'circle' | 'square';
6 size?: AvatarSize;
7 gap?: number;
8 /** Src of image avatar */
9 src?: React.ReactNode;
10 /** Srcset of image avatar */
11 srcSet?: string;
12 draggable?: boolean | 'true' | 'false';
13 /** Icon to be used in avatar */
14 icon?: React.ReactNode;
15 style?: React.CSSProperties;
16 prefixCls?: string;
17 className?: string;
18 rootClassName?: string;
19 children?: React.ReactNode;
20 alt?: string;
21 crossOrigin?: '' | 'anonymous' | 'use-credentials';
22 onClick?: (e?: React.MouseEvent<HTMLElement>) => void;
23 onError?: () => boolean;
24}
25declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
26export default Avatar;