added stateMachine to stateMachine communication
This commit is contained in:
@ -5,6 +5,31 @@
|
||||
|
||||
export let machine;
|
||||
|
||||
let composite = {
|
||||
id: 'testingstuff',
|
||||
layout: {
|
||||
columns: '1fr 1fr',
|
||||
areas: `
|
||||
"left right"
|
||||
`
|
||||
},
|
||||
children: [
|
||||
{
|
||||
id: 'child',
|
||||
component: 'LearnReady',
|
||||
slot: 'left',
|
||||
store: {
|
||||
xstate: 'NOTREADY'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'parent',
|
||||
component: 'LearnColor',
|
||||
slot: 'right'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
let current = machine.initialState.value;
|
||||
|
||||
const service = interpret(machine)
|
||||
@ -19,6 +44,9 @@
|
||||
|
||||
<main class="grid w-full h-full grid-rows-layout">
|
||||
<div class="w-full h-full p-4 overflow-scroll">
|
||||
<div class="h-1/4">
|
||||
<Composite {composite} />
|
||||
</div>
|
||||
<p>Current state: {current}</p>
|
||||
<h1>{machine.states[current].meta.title}</h1>
|
||||
{#if machine.states[current].meta.composite}
|
||||
|
Reference in New Issue
Block a user