bitburner-src/src/ui/React/DialogBox.tsx
2021-10-03 21:33:48 -04:00

12 lines
293 B
TypeScript

import { AlertEvents } from "./AlertManager";
import React from "react";
export function dialogBoxCreate(txt: string | JSX.Element): void {
if (typeof txt !== "string") {
AlertEvents.emit(txt);
} else {
AlertEvents.emit(<span dangerouslySetInnerHTML={{ __html: txt }} />);
}
}