mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 17:58:27 +02:00
@@ -52,13 +52,16 @@ export function TemplateVariableDialog({ hide, onChange, initialTokens }: Props)
|
|||||||
<VStack space={2}>
|
<VStack space={2}>
|
||||||
<Select
|
<Select
|
||||||
name="variable"
|
name="variable"
|
||||||
label="Variable"
|
label="Select Variable"
|
||||||
value={selectedVariableName}
|
value={selectedVariableName}
|
||||||
options={variables.map((v) => ({ label: v.name, value: v.name }))}
|
options={variables.map((v) => ({ label: v.name, value: v.name }))}
|
||||||
onChange={setSelectedVariableName}
|
onChange={setSelectedVariableName}
|
||||||
/>
|
/>
|
||||||
</VStack>
|
</VStack>
|
||||||
<InlineCode className="select-text cursor-text">{rendered.data}</InlineCode>
|
<VStack>
|
||||||
|
<div className="text-sm text-text-subtle">Render Preview</div>
|
||||||
|
<InlineCode className="select-text cursor-text">{rendered.data}</InlineCode>
|
||||||
|
</VStack>
|
||||||
<Button color="primary" onClick={handleDone}>
|
<Button color="primary" onClick={handleDone}>
|
||||||
Done
|
Done
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ export const Editor = forwardRef<EditorView | undefined, EditorProps>(function E
|
|||||||
dialog.show({
|
dialog.show({
|
||||||
size: 'dynamic',
|
size: 'dynamic',
|
||||||
id: 'template-variable',
|
id: 'template-variable',
|
||||||
title: 'Configure Variable',
|
title: 'Change Variable',
|
||||||
render: ({ hide }) => (
|
render: ({ hide }) => (
|
||||||
<TemplateVariableDialog
|
<TemplateVariableDialog
|
||||||
hide={hide}
|
hide={hide}
|
||||||
|
|||||||
Reference in New Issue
Block a user