From 178dc26c1686b5a4deed1429d30e72190ce2f0ab Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 5 Sep 2022 16:35:25 +0100 Subject: [PATCH] Allow custom CSS to be bindable and allow overriding via conditional UI --- .../settings/ConditionalUIDrawer.svelte | 4 +- .../settings/CustomStylesSection.svelte | 56 ++++++++++--------- .../client/src/components/Component.svelte | 25 +++++++-- 3 files changed, 51 insertions(+), 34 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte index 9f4dbbbde5..74f0c930cd 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte @@ -57,8 +57,8 @@ let dragDisabled = true $: settings = getComponentSettings($selectedComponent?._component)?.concat({ - label: "CSS", - key: "css", + label: "Custom CSS", + key: "_css", type: "text", }) $: settingOptions = settings.map(setting => ({ diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/CustomStylesSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/CustomStylesSection.svelte index 187d9ff760..1c7eddc476 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/CustomStylesSection.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/CustomStylesSection.svelte @@ -1,30 +1,41 @@