retro-react
Version:
A React component library for building retro-style websites
55 lines (54 loc) • 1.55 kB
TypeScript
/// <reference types="react" />
import { ThemeUICSSObject } from 'theme-ui';
export declare type AvatarColor = 'primary' | 'secondary' | 'success' | 'error' | 'warn' | 'greyscale' | 'greyscale-dark';
export declare type AvatarSize = 'small' | 'medium' | 'large';
export declare type AvatarVariant = 'circle' | 'square';
export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* The size of the Avatar.
*
* @default 'medium'
*/
size?: AvatarSize;
/**
* The variant of the Avatar.
*
* @default 'circle'
*/
variant?: AvatarVariant;
/**
* The color of the Avatar.
*
* @default 'primary'
*/
color?: AvatarColor;
/**
* Determines if the Avatar should have rounded edges.
*
* @default false
*/
rounded?: boolean;
/**
* The content of the Avatar.
*
* @default undefined
*/
children?: string;
/**
* The image source of the Avatar. If not provided, a pattern with text will be used.
*
* @default undefined
*/
src?: string;
sx?: ThemeUICSSObject;
}
/**
* Avatars are used to represent a user or entity.
* They can be used to display a user's profile picture, initials or icon.
*
* @example
* <Avatar color="success" size="large" variant="circle">
* AB
* </Avatar>
*/
export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLDivElement>>;