implement game delete confirmation modal

This commit is contained in:
Nolshine
2021-09-16 01:21:45 +01:00
committed by Olivier Gagnon
parent 2922e42055
commit 5d9f9d2681
2 changed files with 37 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
import React from "react";
import { Modal } from "./Modal";
import Button from "@material-ui/core/Button";
import Typography from "@material-ui/core/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>
);
}