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 { SxProps } from "@mui/system";
|
|
|
|
import { Typography } from "@mui/material";
|
2021-08-18 06:51:51 +02:00
|
|
|
|
2022-01-25 14:16:48 +01:00
|
|
|
export function dialogBoxCreate(txt: string | JSX.Element, styles?: SxProps): void {
|
2021-10-01 16:39:09 +02:00
|
|
|
if (typeof txt !== "string") {
|
|
|
|
AlertEvents.emit(txt);
|
2021-09-05 01:09:30 +02:00
|
|
|
} else {
|
2022-01-25 14:16:48 +01:00
|
|
|
AlertEvents.emit(<Typography component="span" sx={styles} dangerouslySetInnerHTML={{ __html: txt }} />);
|
2021-09-05 01:09:30 +02:00
|
|
|
}
|
2021-08-18 06:51:51 +02:00
|
|
|
}
|