mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 10:12:53 +02:00
Fix lit files, reallow html alerts
This commit is contained in:
@@ -3,6 +3,14 @@ import { AlertEvents } from "./AlertManager";
|
||||
import React from "react";
|
||||
import { Typography } from "@mui/material";
|
||||
|
||||
export function dialogBoxCreate(txt: string | JSX.Element): void {
|
||||
AlertEvents.emit(typeof txt === "string" ? <Typography component="span">{txt}</Typography> : txt);
|
||||
export function dialogBoxCreate(txt: string | JSX.Element, html = false): void {
|
||||
AlertEvents.emit(
|
||||
typeof txt !== "string" ? (
|
||||
txt
|
||||
) : html ? (
|
||||
<div dangerouslySetInnerHTML={{ __html: txt }}></div>
|
||||
) : (
|
||||
<Typography component="span">{txt}</Typography>
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user