import { Link } from '@/ui/Link'; import { PlaceholderImage } from '@/ui/PlaceholderImage'; import { Box } from '@/ui/Box'; import { Text } from '@/ui/Text'; import { Badge } from '@/ui/Badge'; import { Image } from '@/ui/Image'; export interface DriverIdentityProps { driver: { id: string; name: string; avatarUrl: string | null; }; href?: string; contextLabel?: React.ReactNode; meta?: React.ReactNode; size?: 'sm' | 'md'; } export function DriverIdentity(props: DriverIdentityProps) { const { driver, href, contextLabel, meta, size = 'md' } = props; const avatarSize = size === 'sm' ? 40 : 48; const nameSize = size === 'sm' ? 'sm' : 'base'; const avatarUrl = driver.avatarUrl; const content = ( {avatarUrl ? ( {driver.name} ) : ( )} {driver.name} {contextLabel && ( {contextLabel} )} {meta && ( {meta} )} ); if (href) { return ( {content} ); } return {content}; }