UNPKG

reablocks

Version:
51 lines (50 loc) 1.12 kB
import { default as React, FC, LegacyRef } from 'react'; import { AvatarTheme } from './AvatarTheme'; export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> { /** * The name of the person. */ name?: string; /** * The URL of the avatar image. */ src?: string; /** * The size of the avatar. * @default 24 */ size?: number; /** * Style variant for the avatar. * @default 'filled' */ variant?: 'filled' | 'outline'; /** * Whether the avatar is rounded. * @default true */ rounded?: boolean; /** * Color override for the avatar. */ color?: string; /** * Custom color options for the color generator. */ colorOptions?: { saturation: number; lightness: number; alpha: number; }; /** * Theme for the Avatar. */ theme?: AvatarTheme; } export interface AvatarRef { /** * Reference to the root div element. */ ref?: LegacyRef<HTMLDivElement>; } export declare const Avatar: FC<AvatarProps> & AvatarRef;