import PropTypes from 'prop-types' import { Flex } from 'antd' import HProgress from './HProgress' import ElipsisText from './ElipsisText' const ProgressDisplay = ({ children, labelPosition = 'top', labelType, percent, status, showInfo, style }) => { const label = children ? ( {children} ) : null const progress = ( ) return ( {labelPosition === 'bottom' ? ( <> {progress} {label} ) : ( <> {label} {progress} )} ) } ProgressDisplay.propTypes = { children: PropTypes.node, labelPosition: PropTypes.oneOf(['top', 'bottom']), labelType: PropTypes.oneOf(['secondary']), percent: PropTypes.number, status: PropTypes.oneOf(['normal', 'exception', 'active', 'success']), showInfo: PropTypes.bool, style: PropTypes.object } export default ProgressDisplay