diff --git a/src/button/Button.jsx b/src/button/Button.jsx index fab73765c..4c1e73af9 100644 --- a/src/button/Button.jsx +++ b/src/button/Button.jsx @@ -19,7 +19,7 @@ export default class Button extends Component { })} disabled={this.props.disabled} type={this.props.nativeType} onClick={this.onClick.bind(this)}> { this.props.loading && } { this.props.icon && !this.props.loading && } - {this.props.children} + { this.props.children && {this.props.children} } ) } diff --git a/src/progress/Progress.jsx b/src/progress/Progress.jsx index 95d75d795..63fd5b427 100644 --- a/src/progress/Progress.jsx +++ b/src/progress/Progress.jsx @@ -52,15 +52,19 @@ export default class Progress extends Component { stroke(): string { let ret; - switch (this.props.status) { - case 'success': - ret = '#13ce66'; - break; - case 'exception': - ret = '#ff4949'; - break; - default: - ret = '#20a0ff'; + if(this.props.color){ + ret = this.props.color + }else{ + switch (this.props.status) { + case 'success': + ret = '#13ce66'; + break; + case 'exception': + ret = '#ff4949'; + break; + default: + ret = '#20a0ff'; + } } return ret; } @@ -97,7 +101,7 @@ export default class Progress extends Component { >
{showText && textInside && @@ -167,5 +171,6 @@ Progress.propTypes = { strokeWidth: PropTypes.number, width: PropTypes.number, textInside: PropTypes.bool, - showText: PropTypes.bool + showText: PropTypes.bool, + color: PropTypes.string, };