fix story
This commit is contained in:
parent
db030556cf
commit
0f3fe04e75
1 changed files with 5 additions and 2 deletions
|
|
@ -16,15 +16,18 @@
|
|||
},
|
||||
},
|
||||
});
|
||||
|
||||
let dialog: HTMLDialogElement | undefined = $state(undefined);
|
||||
</script>
|
||||
|
||||
{#snippet template({ children: _, ...props }: Partial<ComponentProps<typeof Modal>>)}
|
||||
<Modal {...props}>
|
||||
<Button onclick={() => dialog?.showModal()}>Open</Button>
|
||||
<Modal {...props} backdrop bind:dialog>
|
||||
<ModalBody>
|
||||
<h3 class="text-lg font-bold">Hello!</h3>
|
||||
<p class="py-4">Press ESC key or click the button below to close</p>
|
||||
<ModalActions>
|
||||
<Button>Close</Button>
|
||||
<Button onclick={() => dialog?.close()}>Close</Button>
|
||||
</ModalActions>
|
||||
</ModalBody>
|
||||
</Modal>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue