mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-10-23 10:13:13 +02:00
30 lines
637 B
TypeScript
30 lines
637 B
TypeScript
import React from "react";
|
|
import { Modal } from "./Modal";
|
|
|
|
import Button from "@mui/material/Button";
|
|
import Typography from "@mui/material/Typography";
|
|
|
|
interface IProps {
|
|
open: boolean;
|
|
onClose: () => void;
|
|
onConfirm: () => void;
|
|
confirmationText: string;
|
|
}
|
|
|
|
export function ConfirmationModal(props: IProps): React.ReactElement {
|
|
return (
|
|
<Modal open={props.open} onClose={props.onClose}>
|
|
<>
|
|
<Typography>{props.confirmationText}</Typography>
|
|
<Button
|
|
onClick={() => {
|
|
props.onConfirm();
|
|
}}
|
|
>
|
|
Confirm
|
|
</Button>
|
|
</>
|
|
</Modal>
|
|
);
|
|
}
|