import React, { FunctionComponent } from 'react'; import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, } from '@material-ui/core'; type Props = { open: boolean; cancelHandler: () => void; acceptHandler: () => void; body: React.ReactElement; title: React.ReactElement; cancelComponent: React.ReactElement; acceptComponent: React.ReactElement; }; const AlertDialog: FunctionComponent = ({ open, cancelHandler, acceptHandler, body, title, cancelComponent, acceptComponent, }) => { return ( {title} {body} {acceptHandler && ( )} {cancelHandler && ( )} ); }; export default AlertDialog;