blob: 5a95810a4e893d026b51a1491003514bd5e8ce2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import PropTypes from 'prop-types'
import React from 'react'
import Modal from './Modal'
function ConfirmationModal({ title, message, show, callback }) {
return (
<Modal
title={title}
show={show}
onSubmit={() => callback(true)}
onCancel={() => callback(false)}
submitButtonType="danger"
submitButtonText="Confirm"
>
{message}
</Modal>
)
}
ConfirmationModal.propTypes = {
title: PropTypes.string.isRequired,
message: PropTypes.string.isRequired,
show: PropTypes.bool.isRequired,
callback: PropTypes.func.isRequired,
}
export default ConfirmationModal
|