refactor(web): ConfirmDialog and dialogController (#9716)

* wrapper

* no more callback

* refactor: wip

* refactor: wip

* refactor: wip

* pr feedback

* fix

* pr feedback
This commit is contained in:
Alex 2024-05-28 09:10:43 +07:00 committed by GitHub
parent f020d29ab6
commit bce916e4c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 281 additions and 317 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import ConfirmDialogue from '../shared-components/confirm-dialogue.svelte';
import ConfirmDialog from '../shared-components/dialog/confirm-dialog.svelte';
import { showDeleteModal } from '$lib/stores/preferences.store';
import Checkbox from '$lib/components/elements/checkbox.svelte';
import { s } from '$lib/utils';
@ -22,12 +22,12 @@
};
</script>
<ConfirmDialogue
<ConfirmDialog
id="permanently-delete-asset-modal"
title="Permanently delete asset{s(size)}"
confirmText="Delete"
onConfirm={handleConfirm}
onClose={() => dispatch('cancel')}
onCancel={() => dispatch('cancel')}
>
<svelte:fragment slot="prompt">
<p>
@ -44,4 +44,4 @@
<Checkbox id="confirm-deletion-input" label="Do not show this message again" bind:checked />
</div>
</svelte:fragment>
</ConfirmDialogue>
</ConfirmDialog>