Vanessa 2024-03-25 11:15:00 +08:00
parent a3e3a0aeed
commit 1d176d5a09
7 changed files with 45 additions and 33 deletions

View file

@ -1,7 +1,11 @@
import {isMobile} from "../util/functions";
import {Dialog} from "./index";
export const confirmDialog = (title: string, text: string, confirm?: (dialog:Dialog) => void, cancel?: (dialog:Dialog) => void) => {
export const confirmDialog = (title: string, text: string, confirm?: (dialog?: Dialog) => void, cancel?: (dialog: Dialog) => void) => {
if (!text && !title) {
confirm();
return;
}
const dialog = new Dialog({
title,
content: `<div class="b3-dialog__content">