import React from "react";
import { Modal } from "antd";
import { WeaProgress } from "ecCom";

export default class ProgressModal extends React.Component {
  render() {
    const { title = "正在核算请稍后" } = this.props;
    return (
      <div>
        <Modal
          title={title} style={{ top: 20 }} visible={this.props.visible}
          width={this.props.width ? this.props.width : 600}
          maskClosable={false}
          onCancel={() => {
            this.props.onCancel();
          }} footer={null}>
          <div>
            <WeaProgress percent={this.props.progress ? this.props.progress : 0}
                         strokeColor={this.props.color ? this.props.color : "#B37BFA"}/>
          </div>
        </Modal>
      </div>
    );
  }
}
