import React, { ComponentType } from 'react'; import { CustomStyledComponentResult, RcBaseProps, RcBaseSize, RcClassesProps, RcPaletteProp } from '../../foundation'; import { SvgSymbol } from '../Icon'; import { RcPresenceProps } from '../Presence'; import { WithTooltipProps } from '../Tooltip'; import { StyledAvatar } from './styles'; declare type RcAvatarSize = RcBaseSize<'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'>; declare type RcAvatarClassKey = 'presenceWrapper' | 'avatarContainer' | 'mask'; declare type PresenceOrigin = { vertical: 'top' | 'bottom'; horizontal: 'left' | 'right'; }; declare type RcAvatarProps = { /** The anchor of the presence. */ presenceOrigin?: PresenceOrigin; /** src for avatar image */ src?: string; /** attrs on img element */ imgProps?: React.ImgHTMLAttributes; /** avatar size, also presence size if not custom presence */ size?: RcAvatarSize; /** avatar color */ color?: RcPaletteProp; /** is that avatar can be click, default is false */ clickable?: T; /** * with mack in the bottom of avatar, * when pass boolean, that will use default `` to render mask, * also can provide `jsx` to custom below render */ mask?: boolean | JSX.Element; /** support custom presence */ presence?: JSX.Element; /** useless when prop 'presence' is not empty */ presenceProps?: Omit; /** icon for `RcIcon` render */ iconSymbol?: SvgSymbol; /** can custom the icon size, half mean that will be half size of avatar */ iconSize?: RcAvatarSize | 'half'; /** only show presence when hovered or active */ shouldRenderPresenceHovered?: boolean; /** * @deprecated * support custom Img component, if render img in avatar content * useless when 'iconSymbol' is provide, * just use ` in children` */ Img?: ComponentType<{ src: string; }>; /** @deprecated if 'true', will just use color value, use `color` directly */ customColor?: boolean; /** @deprecated force set avatar clickable, default is true, please use clickable to set clickable */ unClickable?: boolean; /** @deprecated not used, just keep type temp */ isMember?: boolean; /** @deprecated not used, just keep type temp */ displayName?: string; /** @deprecated alt for img, just use ` in children or imgProps for apply alt` */ alt?: string; /** @deprecated support tooltip for avatar, use title to replace */ tooltip?: string; } & RcClassesProps & RcBaseProps, HTMLButtonElement> : React.DetailedHTMLProps, HTMLDivElement>, 'color' | 'title'>; declare const ExportType: (props: RcAvatarProps & WithTooltipProps) => JSX.Element & CustomStyledComponentResult & WithTooltipProps>; export { ExportType as RcAvatar, StyledAvatar }; export type { PresenceOrigin, RcAvatarProps, RcAvatarSize };