import { LucideIcon } from 'lucide-react'; import { ReactNode } from 'react'; import { Box } from './Box'; import { Icon } from './Icon'; import { Text } from './Text'; export interface FormFieldProps { label?: string; error?: string; hint?: string; required?: boolean; icon?: LucideIcon; children: ReactNode; } export const FormField = ({ label, error, hint, required, icon, children }: FormFieldProps) => { return ( {label && ( {icon && } {label} {required && *} )} {children} {error && ( {error} )} {hint && !error && ( {hint} )} ); };