From 49ccf8ebc8ed80e2ebf4f7a962537e0090d90980 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 30 Sep 2020 09:28:18 +0100 Subject: [PATCH] Update automation page with new form styles --- .../SetupPanel/AutomationBlockSetup.svelte | 11 +--- .../ParamInputs/RecordSelector.svelte | 50 +++++++------------ .../userInterface/BindableInput.svelte | 4 +- 3 files changed, 21 insertions(+), 44 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 950df5cd19..808001bb91 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -48,7 +48,7 @@
{block.name}
{#each inputs as [key, value]}
-
{value.title}
+ {#if value.type === 'string' && value.enum} - - {#each schema.constraints.inclusion as option} - - {/each} - - {:else if schema.type === 'string' || schema.type === 'number'} - - {/if} -
+ {#if schemaHasOptions(schema)} + + {:else if schema.type === 'string' || schema.type === 'number'} + + {/if} {/each} {/if} diff --git a/packages/builder/src/components/userInterface/BindableInput.svelte b/packages/builder/src/components/userInterface/BindableInput.svelte index 166c486fa1..5ba0798718 100644 --- a/packages/builder/src/components/userInterface/BindableInput.svelte +++ b/packages/builder/src/components/userInterface/BindableInput.svelte @@ -42,8 +42,8 @@ height: 24px; width: 24px; background: var(--grey-4); - right: 7px; - bottom: 7px; + right: var(--spacing-s); + bottom: 9px; } button:hover { background: var(--grey-5);