import { Avatar } from '@/ui/Avatar';
import { Badge } from '@/ui/Badge';
import { Box } from '@/ui/Box';
import { Link } from '@/ui/Link';
import { Text } from '@/ui/Text';
import React from 'react';
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({ driver, href, contextLabel, meta, size = 'md' }: DriverIdentityProps) {
const nameSize = size === 'sm' ? 'sm' : 'base';
const content = (
{driver.name}
{contextLabel && (
{contextLabel}
)}
{meta && (
{meta}
)}
);
if (href) {
return (
{content}
);
}
return {content};
}