import * as React from 'react'; import { CSSProperties } from 'react'; import { BorderProps, FontSizeVals, IMarginProps } from '../../enhancers'; import { IIconProps } from '../Icon'; declare type AvatarSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl'; export declare const sizes: Record; export declare type AvatarProps = IMarginProps & Pick & { size?: AvatarSize; className?: string; /** * Optional background color. * * - If `fg` is set then `bg` defaults to a lighter shade of `fg` * - If `fg` is not set and `name` is set, then `bg` defaults to a random color that is generated based on the `name` value. */ bg?: CSSProperties['backgroundColor']; /** * Optional foreground color. */ fg?: CSSProperties['color']; /** * The name of the entity in the avatar. * * - if `src` is also set, the name will be used in the `alt` attribute of the image. * - If `src` is not set, the name will be used to create the initials */ name?: string; /** * @deprecated Use `name` instead. */ letter?: string; /** * The image url of the `Avatar` */ src?: string; /** * The icon to use in the `Avatar`. */ icon?: IIconProps['icon']; /** * @deprecated Omit `name`, `src`, and `icon` to get equivalent "blank/spacer" avatar. */ blank?: true; /** * Optionally force an inverted icon. * * `isInverted` defaults to true when an avatar is rendered in dark mode context. */ isInverted?: boolean; /** * Do not set a title or alt attribute. Useful if handling this another way, for example with a wrapping tooltip. */ noTitleAlt?: boolean; }; export declare const Avatar: React.MemoExoticComponent & { size?: AvatarSize; className?: string; /** * Optional background color. * * - If `fg` is set then `bg` defaults to a lighter shade of `fg` * - If `fg` is not set and `name` is set, then `bg` defaults to a random color that is generated based on the `name` value. */ bg?: CSSProperties['backgroundColor']; /** * Optional foreground color. */ fg?: CSSProperties['color']; /** * The name of the entity in the avatar. * * - if `src` is also set, the name will be used in the `alt` attribute of the image. * - If `src` is not set, the name will be used to create the initials */ name?: string; /** * @deprecated Use `name` instead. */ letter?: string; /** * The image url of the `Avatar` */ src?: string; /** * The icon to use in the `Avatar`. */ icon?: IIconProps['icon']; /** * @deprecated Omit `name`, `src`, and `icon` to get equivalent "blank/spacer" avatar. */ blank?: true; /** * Optionally force an inverted icon. * * `isInverted` defaults to true when an avatar is rendered in dark mode context. */ isInverted?: boolean; /** * Do not set a title or alt attribute. Useful if handling this another way, for example with a wrapping tooltip. */ noTitleAlt?: boolean; } & React.RefAttributes>>; export {};