mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 02:03:01 +02:00
Reset styles for html changelogs in getUpdateText
Adds an optional sxProps to the DialogBox component.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
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): void {
|
||||
export function dialogBoxCreate(txt: string | JSX.Element, styles?: SxProps): void {
|
||||
if (typeof txt !== "string") {
|
||||
AlertEvents.emit(txt);
|
||||
} else {
|
||||
AlertEvents.emit(<span dangerouslySetInnerHTML={{ __html: txt }} />);
|
||||
AlertEvents.emit(<Typography component="span" sx={styles} dangerouslySetInnerHTML={{ __html: txt }} />);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user