import React from 'react'; import PropTypes from 'prop-types'; import { Modal, ProgressBar } from 'patternfly-react'; import { sprintf } from 'foremanReact/common/I18n'; 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;