1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-21 02:20:17 +00:00
seahub/frontend/src/components/dialog/delete-wiki-dialog.js

30 lines
959 B
JavaScript
Raw Normal View History

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,
title: PropTypes.string.isRequired,
content: PropTypes.node.isRequired,
footer: PropTypes.string.isRequired,
2018-12-07 16:01:23 +00:00
};
function DeleteWikiDialog({ handleSubmit, toggleCancel, title, content, footer }) {
return (
<Modal isOpen={true} toggle={toggleCancel}>
<ModalHeader toggle={toggleCancel}>{title}</ModalHeader>
<ModalBody>{content}</ModalBody>
<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
}
DeleteWikiDialog.propTypes = propTypes;
2018-12-07 16:01:23 +00:00
export default DeleteWikiDialog;