Skip to content

Commit

Permalink
Fix Dialog in Dialog example
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Aug 12, 2024
1 parent 77197ff commit 3791b63
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@
<h2>Dialog in Dialog</h2>

<Preview>
<Toggle let:on={open} let:toggle={toggleDelete}>
<Button icon={mdiTrashCan} on:click={toggleDelete} color="danger">Delete</Button>
<Dialog {open}>
<Toggle let:on={open} let:toggleOn={toggleDeleteOn} let:toggleOff={toggleDeleteOff}>
<Button icon={mdiTrashCan} on:click={toggleDeleteOn} color="danger">Delete</Button>
<Dialog {open} on:close={toggleDeleteOff}>
<div slot="title">Delete this item ?</div>
<div class="px-6 py-3">This will permanently delete the item</div>
<div slot="actions">
Expand All @@ -148,7 +148,7 @@
on:click={(e) => {
console.log('Deleting item...');
toggleConfirm();
toggleDelete();
toggleDeleteOff();
}}
variant="fill"
color="danger"
Expand Down

0 comments on commit 3791b63

Please sign in to comment.