From dc92307af4fb8a909262448c25a9967a672fccf5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 30 Apr 2021 16:42:53 +0100 Subject: [PATCH] Fix button sizes in settings --- .../EventsEditor/EventPropertyControl.svelte | 2 +- .../PropertyControls/FilterEditor.svelte | 2 +- .../PropertiesPanel/SettingsView.svelte | 42 ++++++++++++------- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte index 64d0e72930..0ba0bdc4db 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte @@ -51,7 +51,7 @@ } - + Define what actions to run. diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor.svelte index 06b4930d53..0b67043dd2 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor.svelte @@ -35,7 +35,7 @@ } - + diff --git a/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte b/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte index af81ea3d24..fc8e42b95e 100644 --- a/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte @@ -80,11 +80,11 @@ "field/link": RelationshipFieldSelect, } - const getControl = type => { + const getControl = (type) => { return controlMap[type] } - const canRenderControl = setting => { + const canRenderControl = (setting) => { const control = getControl(setting?.type) if (!control) { return false @@ -95,7 +95,7 @@ return true } - const onInstanceNameChange = name => { + const onInstanceNameChange = (name) => { onChange("_instanceName", name) } @@ -103,13 +103,13 @@ const form = findClosestMatchingComponent( $currentAsset.props, componentInstance._id, - component => component._component.endsWith("/form") + (component) => component._component.endsWith("/form") ) const dataSource = form?.dataSource const fields = makeDatasourceFormComponents(dataSource) onChange( "_children", - fields.map(field => field.json()) + fields.map((field) => field.json()) ) } @@ -123,7 +123,8 @@ label={def.label} key={def.key} value={get(assetInstance, def.key)} - onChange={val => onScreenPropChange(def.key, val)} /> + onChange={(val) => onScreenPropChange(def.key, val)} + /> {/each} {/if} @@ -134,7 +135,8 @@ label="Name" key="_instanceName" value={componentInstance._instanceName} - onChange={onInstanceNameChange} /> + onChange={onInstanceNameChange} + /> {/if} {#if settings && settings.length > 0} @@ -145,10 +147,12 @@ control={getControl(setting.type)} label={setting.label} key={setting.key} - value={componentInstance[setting.key] ?? componentInstance[setting.key]?.defaultValue} + value={componentInstance[setting.key] ?? + componentInstance[setting.key]?.defaultValue} {componentInstance} - onChange={val => onChange(setting.key, val)} - props={{ options: setting.options, placeholder: setting.placeholder }} /> + onChange={(val) => onChange(setting.key, val)} + props={{ options: setting.options, placeholder: setting.placeholder }} + /> {/if} {/each} {:else} @@ -157,10 +161,12 @@ {/if} - {#if componentDefinition?.component?.endsWith('/fieldgroup')} - + {#if componentDefinition?.component?.endsWith("/fieldgroup")} +
+ +
{/if} + title="Confirm Form Field Update" +/>