bitburner-src/src/ui/React/DialogBox.tsx

12 lines
293 B
TypeScript
Raw Normal View History

import { AlertEvents } from "./AlertManager";
import React from "react";
export function dialogBoxCreate(txt: string | JSX.Element): void {
if (typeof txt !== "string") {
AlertEvents.emit(txt);
2021-09-05 01:09:30 +02:00
} else {
2021-10-04 03:33:48 +02:00
AlertEvents.emit(<span dangerouslySetInnerHTML={{ __html: txt }} />);
2021-09-05 01:09:30 +02:00
}
}