Cleanup web import

This commit is contained in:
ZXY101
2023-10-03 11:17:26 +02:00
parent 9bbfe42934
commit 50ea6c49f5
3 changed files with 22 additions and 13 deletions

View File

@@ -4,13 +4,15 @@ type ConfirmationPopup = {
open: boolean;
message: string;
onConfirm?: () => void;
onCancel?: () => void;
};
export const confirmationPopupStore = writable<ConfirmationPopup | undefined>(undefined);
export function promptConfirmation(message: string, onConfirm?: () => void) {
export function promptConfirmation(message: string, onConfirm?: () => void, onCancel?: () => void) {
confirmationPopupStore.set({
open: true,
message,
onConfirm
onConfirm,
onCancel
});
}