UNPKG

@commercetools-uikit/avatar

Version:

A component for rendering profile images

39 lines (38 loc) 1.12 kB
import { ReactElement } from 'react'; import { type TIconProps } from '@commercetools-uikit/design-system'; export type TAvatarProps = { /** * The first name of the user. */ firstName?: string; /** * The last name of the user. */ lastName?: string; /** * The hashed string of the user gravatar. */ gravatarHash: string; /** * Enhances the appearance of the avatar. */ isHighlighted?: boolean; /** * The size of the rendered avatar. */ size?: 's' | 'm' | 'l'; /** * The color of the avatar. */ color?: 'accent' | 'purple' | 'turquoise' | 'brown'; /** an <Icon /> component */ icon?: ReactElement<TIconProps>; }; export type TGravatarImgProps = Pick<TAvatarProps, 'gravatarHash' | 'isHighlighted' | 'size'>; export type TInitialsProps = Pick<TAvatarProps, 'firstName' | 'lastName' | 'size'>; declare const Avatar: { ({ firstName, lastName, isHighlighted, size, color, ...props }: TAvatarProps): import("@emotion/react/jsx-runtime").JSX.Element; displayName: string; }; export default Avatar;