UNPKG

724 BTypeScriptView Raw
1import * as React from 'react';
2import { AvatarSize } from './SizeContext';
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;
13 /** Icon to be used in avatar */
14 icon?: React.ReactNode;
15 style?: React.CSSProperties;
16 prefixCls?: string;
17 className?: string;
18 children?: React.ReactNode;
19 alt?: string;
20 onError?: () => boolean;
21}
22declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<unknown>>;
23export default Avatar;