web/dialogs: move backdrop close handler to container
This commit is contained in:
parent
b8eb708748
commit
59f5560802
4 changed files with 3 additions and 9 deletions
|
@ -2,6 +2,8 @@
|
||||||
import { tick } from "svelte";
|
import { tick } from "svelte";
|
||||||
import { killDialog } from "$lib/dialogs";
|
import { killDialog } from "$lib/dialogs";
|
||||||
|
|
||||||
|
import DialogBackdropClose from "$components/dialog/DialogBackdropClose.svelte";
|
||||||
|
|
||||||
export let id: string;
|
export let id: string;
|
||||||
|
|
||||||
let dialogParent: HTMLDialogElement;
|
let dialogParent: HTMLDialogElement;
|
||||||
|
@ -30,4 +32,5 @@
|
||||||
|
|
||||||
<dialog id="dialog-{id}" bind:this={dialogParent} class:closing class:open>
|
<dialog id="dialog-{id}" bind:this={dialogParent} class:closing class:open>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
<DialogBackdropClose closeFunc={close} />
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
import PickerItem from "$components/dialog/PickerItem.svelte";
|
import PickerItem from "$components/dialog/PickerItem.svelte";
|
||||||
import DialogButtons from "$components/dialog/DialogButtons.svelte";
|
import DialogButtons from "$components/dialog/DialogButtons.svelte";
|
||||||
import DialogBackdropClose from "$components/dialog/DialogBackdropClose.svelte";
|
|
||||||
|
|
||||||
import IconBoxMultiple from "@tabler/icons-svelte/IconBoxMultiple.svelte";
|
import IconBoxMultiple from "@tabler/icons-svelte/IconBoxMultiple.svelte";
|
||||||
|
|
||||||
|
@ -58,8 +57,6 @@
|
||||||
<DialogButtons {buttons} closeFunc={close} />
|
<DialogButtons {buttons} closeFunc={close} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogBackdropClose closeFunc={close} />
|
|
||||||
</DialogContainer>
|
</DialogContainer>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
import Meowbalt from "$components/misc/Meowbalt.svelte";
|
import Meowbalt from "$components/misc/Meowbalt.svelte";
|
||||||
import DialogButtons from "$components/dialog/DialogButtons.svelte";
|
import DialogButtons from "$components/dialog/DialogButtons.svelte";
|
||||||
import DialogBackdropClose from "$components/dialog/DialogBackdropClose.svelte";
|
|
||||||
import VerticalActionButton from "$components/buttons/VerticalActionButton.svelte";
|
import VerticalActionButton from "$components/buttons/VerticalActionButton.svelte";
|
||||||
|
|
||||||
import IconCopy from "@tabler/icons-svelte/IconCopy.svelte";
|
import IconCopy from "@tabler/icons-svelte/IconCopy.svelte";
|
||||||
|
@ -74,8 +73,6 @@
|
||||||
closeFunc={close}
|
closeFunc={close}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogBackdropClose closeFunc={close} />
|
|
||||||
</DialogContainer>
|
</DialogContainer>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
import Meowbalt from "$components/misc/Meowbalt.svelte";
|
import Meowbalt from "$components/misc/Meowbalt.svelte";
|
||||||
import DialogButtons from "$components/dialog/DialogButtons.svelte";
|
import DialogButtons from "$components/dialog/DialogButtons.svelte";
|
||||||
import DialogBackdropClose from "$components/dialog/DialogBackdropClose.svelte";
|
|
||||||
|
|
||||||
import IconAlertTriangle from "@tabler/icons-svelte/IconAlertTriangle.svelte";
|
import IconAlertTriangle from "@tabler/icons-svelte/IconAlertTriangle.svelte";
|
||||||
|
|
||||||
|
@ -53,8 +52,6 @@
|
||||||
<DialogButtons {buttons} closeFunc={close} />
|
<DialogButtons {buttons} closeFunc={close} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogBackdropClose closeFunc={close} />
|
|
||||||
</DialogContainer>
|
</DialogContainer>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in a new issue