bitburner-src/src/ui/React/DialogBox.tsx
Martin Fournier 8a2cad6c4a Reset styles for html changelogs in getUpdateText
Adds an optional sxProps to the DialogBox component.
2022-01-25 10:20:36 -05:00

14 lines
429 B
TypeScript

import { AlertEvents } from "./AlertManager";
import React from "react";
import { SxProps } from "@mui/system";
import { Typography } from "@mui/material";
export function dialogBoxCreate(txt: string | JSX.Element, styles?: SxProps): void {
if (typeof txt !== "string") {
AlertEvents.emit(txt);
} else {
AlertEvents.emit(<Typography component="span" sx={styles} dangerouslySetInnerHTML={{ __html: txt }} />);
}
}