diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index fe66a7fe35..a303b0262f 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -32,7 +32,11 @@ $builderStore.previewType === "layout" || screenslotContext // Update component context - $: componentStore.set({ id, styles: { ...styles, id, allowSelection } }) + $: componentStore.set({ + id, + children: children.length, + styles: { ...styles, id, allowSelection }, + }) // Gets the component constructor for the specified component const getComponentConstructor = component => { diff --git a/packages/standard-components/src/Icon.svelte b/packages/standard-components/src/Icon.svelte index 6b3b1554fb..34ebd95941 100644 --- a/packages/standard-components/src/Icon.svelte +++ b/packages/standard-components/src/Icon.svelte @@ -1,13 +1,19 @@ - + diff --git a/packages/standard-components/src/List.svelte b/packages/standard-components/src/List.svelte index 1a5638404a..78cd6697a2 100644 --- a/packages/standard-components/src/List.svelte +++ b/packages/standard-components/src/List.svelte @@ -24,9 +24,27 @@
- {#each rows as row} - - - - {/each} + {#if rows.length > 0} + {#each rows as row} + + {#if $component.children === 0} +

Add some components too.

+ {:else} + + {/if} +
+ {/each} + {:else} +

Feed me some data

+ {/if}
+ +