UNPKG

default-avatar

Version:

A customizable React component to generate default avatars with initials and themed colors.

25 lines (24 loc) 584 B
type ShapeProps = { shape?: "circle" | "square"; } | { shape: "rounded"; radius: number | string; }; type AvatarProps = { name: string; fontFamily?: string; size?: number; style?: React.CSSProperties; backgroundColor?: string; textColor?: string; fontSize?: number | string; padding?: number | string; useNameBasedColor?: boolean; theme?: "dark" | "light"; } & ShapeProps; interface AvatarThemeOptions { name?: string; useNameBasedColor?: boolean; theme?: "dark" | "light"; } export { AvatarProps, AvatarThemeOptions };