diff --git a/src/lib/components/Composite.svelte b/src/lib/components/Composite.svelte index 2da1b00..dca2e21 100644 --- a/src/lib/components/Composite.svelte +++ b/src/lib/components/Composite.svelte @@ -15,12 +15,22 @@ {#each componentsData.children as component (component.id)} {#await getComponent(component.componentName) then Component} {#if Component} -
- +
+ + + {#if component.actions} +
+ {#each component.actions as action} + {#await getComponent(action) then ActionComponent} + {#if ActionComponent} + + {:else} +

Action {action} not found.

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

Component {component.componentName} not found.

diff --git a/src/lib/stores/compositeStore.ts b/src/lib/stores/compositeStore.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index b8acce1..35d4bad 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -27,7 +27,8 @@ id: 3, componentName: 'MessageInput', props: {}, - slot: 'footer' + slot: 'footer', + actions: ['ClearMessages', 'SendMessage'] } ] };