2021-10-01 16:39:09 +02:00
|
|
|
import { AlertEvents } from "./AlertManager";
|
2021-08-18 06:51:51 +02:00
|
|
|
|
|
|
|
import React from "react";
|
2022-01-25 14:16:48 +01:00
|
|
|
import { Typography } from "@mui/material";
|
2021-08-18 06:51:51 +02:00
|
|
|
|
2022-09-11 21:20:25 +02:00
|
|
|
export function dialogBoxCreate(txt: string | JSX.Element, html = false): void {
|
|
|
|
AlertEvents.emit(
|
|
|
|
typeof txt !== "string" ? (
|
|
|
|
txt
|
|
|
|
) : html ? (
|
|
|
|
<div dangerouslySetInnerHTML={{ __html: txt }}></div>
|
|
|
|
) : (
|
2022-12-01 22:07:46 +01:00
|
|
|
<Typography component="span" style={{ whiteSpace: "pre-wrap" }}>
|
|
|
|
{txt}
|
|
|
|
</Typography>
|
2022-09-11 21:20:25 +02:00
|
|
|
),
|
|
|
|
);
|
2022-08-28 11:33:38 +02:00
|
|
|
}
|