2018-12-07 16:01:23 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { gettext } from '../../utils/constants';
|
|
|
|
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
|
|
|
|
|
|
|
const propTypes = {
|
|
|
|
toggleCancel: PropTypes.func.isRequired,
|
|
|
|
handleSubmit: PropTypes.func.isRequired,
|
2024-05-31 08:12:53 +00:00
|
|
|
title: PropTypes.string.isRequired,
|
2024-06-01 01:09:42 +00:00
|
|
|
content: PropTypes.node.isRequired,
|
2024-05-31 08:12:53 +00:00
|
|
|
footer: PropTypes.string.isRequired,
|
2018-12-07 16:01:23 +00:00
|
|
|
};
|
|
|
|
|
2024-06-01 01:09:42 +00:00
|
|
|
function DeleteWikiDialog({ handleSubmit, toggleCancel, title, content, footer }) {
|
2024-05-31 08:12:53 +00:00
|
|
|
return (
|
|
|
|
<Modal isOpen={true} toggle={toggleCancel}>
|
|
|
|
<ModalHeader toggle={toggleCancel}>{title}</ModalHeader>
|
2024-06-01 01:09:42 +00:00
|
|
|
<ModalBody>{content}</ModalBody>
|
2024-05-31 08:12:53 +00:00
|
|
|
<ModalFooter>
|
|
|
|
<Button color="secondary" onClick={toggleCancel}>{gettext('Cancel')}</Button>
|
|
|
|
<Button color="primary" onClick={handleSubmit}>{footer}</Button>
|
|
|
|
</ModalFooter>
|
|
|
|
</Modal>
|
|
|
|
);
|
2018-12-07 16:01:23 +00:00
|
|
|
}
|
|
|
|
|
2024-06-01 01:09:42 +00:00
|
|
|
DeleteWikiDialog.propTypes = propTypes;
|
2018-12-07 16:01:23 +00:00
|
|
|
|
2024-06-01 01:09:42 +00:00
|
|
|
export default DeleteWikiDialog;
|