-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp_debug.txt
More file actions
40 lines (38 loc) · 2.9 KB
/
temp_debug.txt
File metadata and controls
40 lines (38 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
}
return (
<div key={key} style={{ padding: '12px', border: '1px solid #3a3a3d', borderRadius: '4px', background: '#151518', display: 'flex', flexDirection: 'column', gap: '10px' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', minWidth: 0 }}>
<input
value={param.paramName || ''}
onChange={(e) => upsertParam(key, (prev) => {
const nextName = e.target.value;
const base = prev.tempVariable
? { ...prev.tempVariable }
: { id: genId('tempvar'), name: nextName, type: 'string' as VariableType, description: '' };
return {
...prev,
paramName: nextName,
kind: 'Temporary',
tempVariable: { ...base, name: nextName }
};
})}
placeholder="Target param name"
disabled={readOnly}
style={{ flex: 1, minWidth: 0, background: '#222', border: '1px solid #444', color: '#eee', padding: '4px 8px', borderRadius: '4px', fontSize: '12px', height: CONTROL_HEIGHT, boxSizing: 'border-box', display: 'flex', alignItems: 'center' }}
/>
<button
className="btn-ghost"
onClick={() => removeParam(key)}
disabled={readOnly}
style={{ fontSize: '12px', color: '#f97316', height: CONTROL_HEIGHT, padding: '0 12px', boxSizing: 'border-box', display: 'flex', alignItems: 'center', ...noWrapText }}
>
Remove
</button>
</div>
<div style={{ display: 'flex', gap: '8px', flexWrap: 'nowrap' }}>
<div style={{ flex: '1 1 50%', minWidth: 0, display: 'flex', flexDirection: 'column', gap: '4px' }}>
<label style={{ fontSize: '10px', color: '#888', ...noWrapText }}>Type</label>
<select
value={tempVar?.type || 'string'}
onChange={(e) => upsertParam(key, (prev) => syncTempType(prev, e.target.value as VariableType))}
disabled={readOnly}