index.js 551 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import './index.less';
  3. import Progress from '../Progress';
  4. function ProgressText(props) {
  5. const { className = '', progress, width, times, unit = '遍', size } = props;
  6. return (
  7. <div className={`progress-text ${className}`}>
  8. <div style={{ width }} className="p">
  9. <Progress progress={progress} size={size} />
  10. </div>
  11. <div className="t">
  12. {times > 0 ? `${times}${unit}+` : ''}
  13. {progress}%
  14. </div>
  15. </div>
  16. );
  17. }
  18. ProgressText.propTypes = {};
  19. export default ProgressText;