export interface FieldProps { label: string; name: string; type?: 'text' | 'email' | 'search'; placeholder?: string; /** The message shown beside the invalid border — the colour never travels alone. */ error?: string; className?: string; } export function Field({ label, name, type = 'text', placeholder, error, className }: FieldProps) { const described = error !== undefined ? `${name}-error` : undefined; return (
{error !== undefined && (

{error}

)}
); }