mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
part 1 of converting gang to react
This commit is contained in:
@@ -31,7 +31,7 @@ function getGameContainer(): void {
|
||||
document.addEventListener("DOMContentLoaded", getGameContainer);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export function createPopup(id: string, rootComponent: ReactComponent, props: any): HTMLElement | null {
|
||||
export function createPopup<T>(id: string, rootComponent: (props: T) => React.ReactElement, props: T): HTMLElement | null {
|
||||
let container = document.getElementById(id);
|
||||
if (container == null) {
|
||||
container = createElement("div", {
|
||||
|
||||
Reference in New Issue
Block a user