fix progressbar worning

This commit is contained in:
xiaoshuai 2015-10-26 20:14:41 +08:00
parent 4f624e1806
commit 25a3a3c7b9
5 changed files with 21 additions and 15 deletions

View File

@ -11,9 +11,9 @@ var ProgressCircle = antd.Progress.Circle;
ReactDOM.render(
<div>
<ProgressCircle percent="30" width="80" />
<ProgressCircle percent="70" width="80" status="exception" />
<ProgressCircle percent="100" width="80" />
<ProgressCircle percent={30} width={80} />
<ProgressCircle percent={70} width={80} status="exception" />
<ProgressCircle percent={100} width={80} />
</div>
, document.getElementById('components-progress-demo-circle-mini'));
````

View File

@ -11,9 +11,9 @@ var ProgressCircle = antd.Progress.Circle;
ReactDOM.render(
<div>
<ProgressCircle percent="30" />
<ProgressCircle percent="70" status="exception" />
<ProgressCircle percent="100" />
<ProgressCircle percent={30} />
<ProgressCircle percent={70} status="exception" />
<ProgressCircle percent={100} />
</div>
, document.getElementById('components-progress-demo-circle'));
````

View File

@ -11,10 +11,10 @@ var Progress = antd.Progress.Line;
ReactDOM.render(
<div style={{ width: 170 }}>
<Progress percent="30" strokeWidth="5" />
<Progress percent="50" strokeWidth="5" status="active" />
<Progress percent="70" strokeWidth="5" status="exception" />
<Progress percent="100" strokeWidth="5" />
<Progress percent={30} strokeWidth={5} />
<Progress percent={50} strokeWidth={5} status="active" />
<Progress percent={70} strokeWidth={5} status="exception" />
<Progress percent={100} strokeWidth={5} />
</div>
, document.getElementById('components-progress-demo-line-mini'));
````

View File

@ -11,11 +11,11 @@ var Progress = antd.Progress.Line;
ReactDOM.render(
<div>
<Progress percent="30" />
<Progress percent="50" status="active" />
<Progress percent="70" status="exception" />
<Progress percent="100" />
<Progress percent="50" showInfo={false} />
<Progress percent={30} />
<Progress percent={50} status="active" />
<Progress percent={70} status="exception" />
<Progress percent={100} />
<Progress percent={50} showInfo={false} />
</div>
, document.getElementById('components-progress-demo-line'));
````

View File

@ -75,6 +75,12 @@ let Line = React.createClass({
});
let Circle = React.createClass({
propTypes: {
status: React.PropTypes.oneOf(['normal', 'exception', 'success']),
percent: React.PropTypes.number,
strokeWidth: React.PropTypes.number,
width: React.PropTypes.number
},
getDefaultProps: function () {
return {
width: 132,