import { sizes } from "../../ui/avatar"; import { ComponentProps, ReactNode } from "react"; import { CompanyAvatar } from "./CompanyAvatar"; import { PersonAvatar } from "./PersonAvatar"; import { TeamAvatar } from "./TeamAvatar"; type PersonAvatarProps = ComponentProps; type TeamAvatarProps = ComponentProps; type CompanyAvatarProps = ComponentProps; export type AvatarVariant = | ({ type: "person" } & Omit) | ({ type: "team" } & Omit) | ({ type: "company" } & Omit); export const Avatar = ({ avatar, size = "xsmall", }: { avatar: AvatarVariant; size?: (typeof sizes)[number]; }): ReactNode => { switch (avatar.type) { case "person": return ( ); case "team": return ( ); case "company": return ( ); } };