UI: Make BN-hint popups harder to be dismissed accidentally (#2021)

This commit is contained in:
catloversg
2025-03-23 13:59:38 +07:00
committed by GitHub
parent 17ffabdfa5
commit 41c497161f
6 changed files with 55 additions and 26 deletions
+5 -1
View File
@@ -3,7 +3,10 @@ import { AlertEvents } from "./AlertManager";
import React from "react";
import { Typography } from "@mui/material";
export function dialogBoxCreate(txt: string | JSX.Element, html = false): void {
export function dialogBoxCreate(
txt: string | JSX.Element,
{ html, canBeDismissedEasily } = { html: false, canBeDismissedEasily: true },
): void {
AlertEvents.emit(
typeof txt !== "string" ? (
txt
@@ -14,5 +17,6 @@ export function dialogBoxCreate(txt: string | JSX.Element, html = false): void {
{txt}
</Typography>
),
canBeDismissedEasily,
);
}