diff --git a/src/lib/components/examples/Recipies.svelte b/src/lib/components/examples/Recipies.svelte index b5f6df2..e10276c 100644 --- a/src/lib/components/examples/Recipies.svelte +++ b/src/lib/components/examples/Recipies.svelte @@ -6,6 +6,7 @@ import { writable, get } from 'svelte/store'; import { createUser } from './userService'; import { derived } from 'svelte/store'; + import Composite from '$lib/core/Composite.svelte'; const initialFormData = { name: '', age: '' }; @@ -79,12 +80,26 @@ }), on: { NEXT: { - target: 'summary', + target: 'litStatus', actions: ['setEmail'] }, BACK: 'name' } }, + litStatus: { + meta: { + title: 'LitStatus', + buttonLabel: 'next', + composite: { + id: 'litStatus', + component: 'LitStatus' + } + }, + on: { + NEXT: 'summary', + BACK: 'email' + } + }, summary: { meta: { title: 'Summary', @@ -92,7 +107,8 @@ buttonLabel: 'test' }, on: { - SUBMIT: 'submitting' + SUBMIT: 'submitting', + BACK: 'litStatus' } }, submitting: { @@ -172,6 +188,10 @@ : ''}
+ {#if stateMachine.states[$state.value].meta.composite} +