import {Circle as Progresscircle} from 'rc-progress';
import React from 'react';
import assign from 'object-assign';
import Icon from '../iconfont';
const prefixCls = 'ant-progress';
const statusColorMap = {
'normal': '#2db7f5',
'exception': '#ff6600',
'success': '#87d068'
};
let Line = React.createClass({
propTypes: {
status: React.PropTypes.oneOf(['normal', 'exception', 'active', 'success']),
showInfo: React.PropTypes.bool,
percent: React.PropTypes.number,
strokeWidth: React.PropTypes.number,
},
getDefaultProps() {
return {
percent: 0,
strokeWidth: 10,
status: 'normal', // exception active
format: '${percent}%',
showInfo: true,
};
},
render() {
let props = assign({}, this.props);
if (parseInt(props.percent, 10) === 100) {
props.status = 'success';
}
let progressInfo;
let fullCls = '';
const text = (typeof props.format === 'string') ?
props.format.replace('${percent}', props.percent) : props.format;
if(props.showInfo === true){
if (props.status === 'exception') {
progressInfo = (
{text}
);
} else if (props.status === 'success') {
progressInfo = (