diff --git a/ui/src/component/ConfirmDialog.js b/ui/src/component/ConfirmDialog.js new file mode 100644 index 0000000..67a0fa6 --- /dev/null +++ b/ui/src/component/ConfirmDialog.js @@ -0,0 +1,33 @@ +import React, {Component} from 'react'; +import Button from 'material-ui/Button'; +import Dialog, {DialogActions, DialogContent, DialogContentText, DialogTitle} from 'material-ui/Dialog'; +import PropTypes from 'prop-types'; + +export default class ConfirmDialog extends Component { + static propTypes = { + title: PropTypes.string.isRequired, + text: PropTypes.string.isRequired, + fClose: PropTypes.func.isRequired, + fOnSubmit: PropTypes.func.isRequired, + }; + + render() { + const {title, text, fClose, fOnSubmit} = this.props; + const submitAndClose = () => { + fOnSubmit(); + fClose(); + }; + return ( + + {title} + + {text} + + + + + + + ); + } +}