export default function FormField({ field, value, onChange }) { const [name,label,type,extra] = field; const common = { id:name, value:value || '', onChange:e => onChange(name,e.target.value), className:'workshop-input', required:extra === true }; return <label className="block text-sm text-slate-300" htmlFor={name}>{label}{extra === true && <span className="text-violet-400"> *</span>}{type === 'select' ? <select {...common}><option value="">Select…</option>{extra.map(v => <option key={v}>{v}</option>)}</select> : <input {...common} type={type}/>}</label> }