1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-28 19:51:34 +00:00
seahub/frontend/src/components/dialog/zip-download-dialog.js
2018-10-25 13:36:06 +08:00

31 lines
673 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
const propTypes = {
onCancelDownload: PropTypes.func.isRequired,
progress: PropTypes.number.isRequired,
};
class ZipDownloadDialog extends React.Component {
toggle = () => {
this.props.onCancelDownload();
}
render() {
return (
<Modal isOpen={true} toggle={this.toggle}>
<ModalHeader toggle={this.toggle}></ModalHeader>
<ModalBody>
<div>{this.props.progress + '%'}</div>
</ModalBody>
</Modal>
);
}
}
ZipDownloadDialog.propTypes = propTypes;
export default ZipDownloadDialog;