Files
auth.andert.me/src/lib/components/refactor/ComposerBob.svelte
2023-08-03 16:47:26 +02:00

22 lines
544 B
Svelte

<script>
export let me;
export let store;
export let machineService;
const handleButton = () => {
console.log('BOB machine service: ' + JSON.stringify(me.do.machine));
console.log('Sending TOGGLE event to the machine');
me.do.machine.send('TOGGLE');
};
</script>
<div class="border-2 border-yellow-500">
<p>My ID is: {me.id}</p>
i am the child and this is my state: {$store.machine.state}
<button
class="px-4 py-2 font-bold text-white bg-blue-500 rounded hover:bg-blue-700"
on:click={handleButton}>Switch</button
>
</div>