Files
windmill/frontend/src/lib/components/flows/content/DynamicInputHelpBox.svelte
T
Faton Ramadani cdc76994f8 feat(frontend): Buttons refactor (#2545)
* feat(frontend): wip

* feat(frontend): button refactor wip

* feat(frontend): button refactor wip

* feat(frontend): fix build

* feat(frontend): fix build

* fix(frontend): fix build

* fix(frontend): fix buttons styles

* fix(frontend): remove dev file

* feat(frontend): clean up

* feat(frontend): done

* feat(frontend): done

* feat(frontend): remove duplicated componnet

* feat(frontend): wip

* feat(frontend): wip

* feat(frontend): forked Flow icons

* feat(frontend): remove legacy dropdown

* feat(frontend): migrated all + remove dependencies

* feat(frontend): clean up
2023-11-10 09:43:10 +01:00

46 lines
1.3 KiB
Svelte

<script lang="ts">
import Button from '$lib/components/common/button/Button.svelte'
import { ChevronDown } from 'lucide-svelte'
import { slide } from 'svelte/transition'
$: opened = false
</script>
<div class="text-xs flex flex-row-reverse mt-1">
<Button
on:click={() => {
opened = !opened
}}
color="light"
size="xs2"
endIcon={{ icon: ChevronDown, classes: `rotate-0 duration-300 ${opened ? '!rotate-180' : ''}` }}
>
Help
</Button>
</div>
{#if opened}
<div
transition:slide|local
class="bg-surface-secondary border-l-4 text-secondary p-4 m-4"
role="alert"
id="dynamic-input-help-box"
>
Single javascript expression. The following functions and objects are available:
<ul class="ml-4">
<li><b>{'results.<id>'}</b>: the result of step at id 'id'</li>
<li><b>flow_input</b>: the object containing the flow input arguments</li>
<li><b>params</b>: the object containing the current step static values</li>
<li>
<b>variable(path)</b>: the function returning the variable (including secrets) at given path
as a string
</li>
<li>
<b>resource(path)</b>: the function returning the resource at a given path as an object
</li>
</ul>
If using multiple statements, the last statement shall finish with a return. e.g: `return x`
</div>
{/if}