/** * FormFieldCompact Component * * Compact form field with label for constructor and settings editors. * Supports text, number, textarea, and color input types. */ import React from 'react'; type FieldType = 'text' | 'number' | 'textarea' | 'color' | 'checkbox'; interface FormFieldCompactProps { label: string; value: string | number | boolean; type?: FieldType; placeholder?: string; hint?: string; min?: number; max?: number; step?: number; rows?: number; disabled?: boolean; onChange: (value: string | boolean) => void; } const FormFieldCompact: React.FC = ({ label, value, type = 'text', placeholder, hint, min, max, step, rows = 4, disabled = false, onChange, }) => { if (type === 'checkbox') { return ( ); } if (type === 'color') { return (
onChange(event.target.value)} /> {hint &&

{hint}

}
); } if (type === 'textarea') { return (