Cleanup web import
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user