chore(web): move BaseModal to callback pattern (#8696)

* chore(web): move BaseModal to callback to close

* chore: add question mark
This commit is contained in:
Ben
2024-04-11 09:01:16 +00:00
committed by GitHub
parent 8c9a092561
commit 37eea2d353
16 changed files with 37 additions and 45 deletions

View File

@@ -2,18 +2,14 @@
import ImmichLogo from '$lib/components/shared-components/immich-logo.svelte';
import Icon from '$lib/components/elements/icon.svelte';
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
import { createEventDispatcher } from 'svelte';
import { mdiClose } from '@mdi/js';
const dispatch = createEventDispatcher<{
close: void;
}>();
/**
* Unique identifier for the header text.
*/
export let id: string;
export let title: string;
export let onClose: () => void;
/**
* If true, the logo will be displayed next to the modal title.
*/
@@ -36,5 +32,5 @@
</h1>
</div>
<CircleIconButton on:click={() => dispatch('close')} icon={mdiClose} size={'20'} title="Close" />
<CircleIconButton on:click={onClose} icon={mdiClose} size={'20'} title="Close" />
</div>