import React from 'react'; import { Card } from '../Card'; import { Avatar } from '../Avatar'; import { Badge } from '../Badge'; import { Button } from '../Button'; import { Icon } from '../Icon'; export interface UserMetric { label: string; value: string | number; } export interface UserCardProps extends React.HTMLAttributes { name: string; title?: string; bio?: string; avatarUrl?: string; metrics?: UserMetric[]; actionLabel?: string; onAction?: () => void; secondaryLabel?: string; onSecondary?: () => void; } export function UserCard({ name, title, bio, avatarUrl, metrics = [], actionLabel, onAction, secondaryLabel, onSecondary, className = '', ...props }: UserCardProps) { return (

{name}

{title && ( {title} )}
{bio && (

{bio}

)} {metrics.length > 0 && (
{metrics.map((m) => (
{m.value}
{m.label}
))}
)}
{actionLabel && ( )} {secondaryLabel && ( )}
); }