reablocks
Version:
Component library for React
49 lines (47 loc) • 1.05 kB
TypeScript
import { AvatarTheme } from './AvatarTheme';
import { default as React, FC, LegacyRef } from 'react';
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.
*/
size?: number;
/**
* Style variant for the avatar.
*/
variant?: 'filled' | 'outline';
/**
* Whether the avatar is rounded.
*/
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;