import React from 'react'; import PropTypes from 'prop-types'; import { Modal, ProgressBar } from 'patternfly-react'; import { sprintf } from 'jed'; const ModalProgressBar = (props) => { const { show, container, task } = props; let modalTitle = null; let progress = 0; if (task) { modalTitle = task.humanized.action; progress = Math.round(task.progress * 100); } return ( {modalTitle} ); }; ModalProgressBar.propTypes = { show: PropTypes.bool.isRequired, container: PropTypes.shape({}), task: PropTypes.shape({}), }; ModalProgressBar.defaultProps = { container: document.body, task: { humanized: {} }, }; export default ModalProgressBar;