diff --git a/src/components/EditPanel.tsx b/src/components/EditPanel.tsx index 2eef0cf..acd40ad 100644 --- a/src/components/EditPanel.tsx +++ b/src/components/EditPanel.tsx @@ -13,6 +13,96 @@ interface EditPanelProps { onCaptureState: (message: string) => void; } +interface DimensionInputProps { + label: string; + field: string; + value: string; + isModified: boolean; + onChange: (val: string) => void; + placeholder?: string; +} + +const DimensionInput = ({ label, value, isModified, onChange, placeholder }: DimensionInputProps) => ( +
+ + onChange(e.target.value)} + placeholder={placeholder} + className={cn( + "w-full bg-slate-900 border rounded p-2 text-sm text-white focus:outline-none focus:ring-1 transition-colors", + isModified ? "border-blue-500 focus:ring-blue-500" : "border-slate-700 focus:border-slate-500" + )} + /> +
+); + +interface FieldEditorProps { + title: string; + field: string; + value: string; + isModified: boolean; + canTranslate: boolean; + isGenerated: boolean; + isLoading: boolean; + onGenerate: () => void; + onChange: (val: string) => void; + onKeyDown: (e: React.KeyboardEvent) => void; +} + +const FieldEditor = ({ + title, + field, + value, + isModified, + canTranslate, + isGenerated, + isLoading, + onGenerate, + onChange, + onKeyDown +}: FieldEditorProps) => ( +
+
+ +
+ {canTranslate && ( +
+ + Can translate from existing +
+ )} + +
+ {isGenerated && ( +
+ + AI Generated - You can still edit manually +
+ )} +
+