Highly ambitious ATProtocol AppView service and sdks
at main 20 lines 465 B view raw
1interface FormControlProps { 2 label: string; 3 htmlFor?: string; 4 error?: string; 5 children: React.ReactNode; 6} 7 8export function FormControl({ label, htmlFor, error, children }: FormControlProps) { 9 return ( 10 <div> 11 <label htmlFor={htmlFor} className="block text-sm font-medium text-zinc-400 mb-2"> 12 {label} 13 </label> 14 {children} 15 {error && ( 16 <p className="mt-1 text-xs text-red-400">{error}</p> 17 )} 18 </div> 19 ); 20}