import * as React from "react"; import { cx } from "@emotion/css"; import { IconSize } from "../../shared/types/iconSize"; import { iconSizes } from "../../shared/styles/styleUtils/layout/iconSizes"; import { avatarContainer, avatarSize, avatarImg } from "../style"; const DEFAULT_AVATAR_SIZE: IconSize = "m"; export interface AvatarProps { /** * URL for the image displayed */ src: string; /** * Text a screenreader will read aloud to describe the image */ label?: string; /** * Which icon size to use for the width and height */ size?: IconSize; /** * Allows custom styling */ className?: string; /** * Human-readable selector used for writing tests */ "data-cy"?: string; } const Avatar = ({ label, src, className, size = DEFAULT_AVATAR_SIZE, "data-cy": dataCy = "avatar" }: AvatarProps) => (