From b2228c19b04aaaa5bff227fe968d2e35ae82316b Mon Sep 17 00:00:00 2001 From: Faton Ramadani Date: Fri, 26 Jan 2024 12:18:35 +0100 Subject: [PATCH] fix(frontend): Fix currency input dark mode (#3085) * fix(frontend): Fix curreny input dark mode * fix(frontend): collapsible alert --- frontend/src/lib/components/ArgInput.svelte | 6 +- .../lib/components/LightweightArgInput.svelte | 6 +- .../src/lib/components/SchemaModal.svelte | 6 +- .../inputs/currency/CurrencyInput.svelte | 9 +- .../lib/components/common/alert/Alert.svelte | 86 ++++++++++++++----- 5 files changed, 81 insertions(+), 32 deletions(-) diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index c10a25589e..0ee02246c5 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -326,11 +326,11 @@ {:else if extra?.currency} {#if isFlowInput} - + If this flow is triggered by a webhook, the default value will not replace a missing value from the payload. It will only be used as the default value in the autogenerated UI. We recommend using default values in the signature of the steps where this value is - used (using `x=default`) to have the desired behavior. + used (using `x=default`) to have the desired behavior. + {/if}
diff --git a/frontend/src/lib/components/apps/components/inputs/currency/CurrencyInput.svelte b/frontend/src/lib/components/apps/components/inputs/currency/CurrencyInput.svelte index e200704ad4..87b535ae94 100644 --- a/frontend/src/lib/components/apps/components/inputs/currency/CurrencyInput.svelte +++ b/frontend/src/lib/components/apps/components/inputs/currency/CurrencyInput.svelte @@ -1,4 +1,6 @@ + +
= { info: Info, @@ -45,12 +56,18 @@ descriptionClass: 'text-green-700 dark:text-green-200' } } + + function toggleCollapse() { + if (collapsible) { + isCollapsed = !isCollapsed + } + }
- -
- - {title} {#if tooltip != '' || documentationLink} - {tooltip} - {/if} - - {#if $$slots.default} -
+
+ - + {title} + {#if tooltip != '' || documentationLink} + {tooltip} + {/if} + + {#if collapsible} + + {/if} +
+ + {#if $$slots.default && !isCollapsed} +
+
+ +
+
+ {/if} + {#if $$slots.default && !collapsible} +
+
+ +
{/if}