From c17550d0c6248a7c3f2525fa0126c350ae0f700e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 10 Jun 2021 09:28:10 +0100 Subject: [PATCH] Don't apply new container layout settings unless props have been defined, so that existing containers are unchanged --- .../standard-components/src/Container.svelte | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/standard-components/src/Container.svelte b/packages/standard-components/src/Container.svelte index 9936a11ca3..9c7e582c71 100644 --- a/packages/standard-components/src/Container.svelte +++ b/packages/standard-components/src/Container.svelte @@ -4,22 +4,21 @@ const { styleable, transition, builderStore } = getContext("sdk") const component = getContext("component") - export let direction = "column" - export let hAlign = "left" - export let vAlign = "top" - export let size = "shrink" + export let direction + export let hAlign + export let vAlign + export let size let element + + $: directionClass = direction ? `direction-${direction}` : "" + $: hAlignClass = hAlign ? `hAlign-${hAlign}` : "" + $: vAlignClass = vAlign ? `vAlign-${vAlign}` : "" + $: sizeClass = size ? `size-${size}` : ""