diff --git a/src/client/game/admin-dialogs.tsx b/src/client/game/admin-dialogs.tsx new file mode 100644 index 00000000..b6bdc50a --- /dev/null +++ b/src/client/game/admin-dialogs.tsx @@ -0,0 +1,82 @@ +import { + Button, + Dialog, + DialogBody, + DialogFooter, + NonIdealState, +} from "@blueprintjs/core"; +import { useState } from "react"; +import { bgColor, buttonColor, textColor } from "../check-dark-mode"; + +interface DrawDialogProps { + dialogText?: string; +} + +/** + * Shows a paused dialog that cannot be closed + * @param props - dialog text + * @returns - pause dialog + */ +export function PauseDialog(props: DrawDialogProps) { + const [isOpen, setIsOpen] = useState(true); + return ( + setIsOpen(false)} + canOutsideClickClose={false} + canEscapeKeyClose={false} + > + + +

+ {props.dialogText || "Game Paused"} +

+
+
+
+ ); +} + +interface NotificationDialogProps { + dialogText: string; +} + +/** + * Shows a closable notification dialog + * @param props - dialog text + * @returns - notification dialog + */ +export function NotificationDialog(props: NotificationDialogProps) { + const [isOpen, setIsOpen] = useState(true); + + /** okay button */ + const actions = ( +