diff --git a/packages/builder/src/components/design/PropertiesPanel/ConditionalUISection.svelte b/packages/builder/src/components/design/PropertiesPanel/ConditionalUISection.svelte new file mode 100644 index 0000000000..5071354813 --- /dev/null +++ b/packages/builder/src/components/design/PropertiesPanel/ConditionalUISection.svelte @@ -0,0 +1,38 @@ + + + +
+ Configure conditions +
+
+{#key componentInstance?._id} + + + Show, hide and update components in response to conditions being met. + + + + +{/key} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte index c1e26e68cd..a1b05ed19c 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte @@ -5,6 +5,7 @@ import ComponentSettingsSection from "./ComponentSettingsSection.svelte" import DesignSection from "./DesignSection.svelte" import CustomStylesSection from "./CustomStylesSection.svelte" + import ConditionalUISection from "./ConditionalUISection.svelte" $: componentInstance = $selectedComponent $: componentDefinition = store.actions.components.getDefinition( @@ -19,6 +20,7 @@ + diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte new file mode 100644 index 0000000000..8bd7341d7c --- /dev/null +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte @@ -0,0 +1,156 @@ + + + +
+ + {#if conditions?.length} +
+ {#each conditions as condition (condition.id)} +
+ +
TO
+ (condition.settingValue = e.detail)} + value={condition.settingValue} + /> + {/if} +
IF
+ (condition.newValue = e.detail)} + /> +