Comparing version 1.0.1 to 1.0.2
@@ -17,6 +17,6 @@ 'use strict'; | ||
'div', | ||
{ className: 'rc-steps-item rc-steps-status-' + props.status }, | ||
{ className: 'rc-steps-item rc-steps-status-' + props.status + (props.icon ? ' rc-steps-custom' : '') }, | ||
React.createElement( | ||
'div', | ||
{ className: 'rc-steps-head' + (props.icon ? ' rc-steps-custom' : '') }, | ||
{ className: 'rc-steps-head' }, | ||
icon | ||
@@ -23,0 +23,0 @@ ), |
@@ -12,2 +12,3 @@ 'use strict'; | ||
return { | ||
init: false, | ||
tailWidth: 0 | ||
@@ -51,3 +52,3 @@ }; | ||
var len = this.props.children.length - 1; | ||
var dw = Math.floor((this._previousStepsWidth - this._totalItemsWidth) / len); | ||
var dw = Math.round((this._previousStepsWidth - this._totalItemsWidth) / len) - 1; | ||
if (dw <= 0) { | ||
@@ -57,2 +58,3 @@ return; | ||
this.setState({ | ||
init: true, | ||
tailWidth: dw | ||
@@ -67,3 +69,3 @@ }); | ||
'div', | ||
{ className: 'rc-steps' + (props.size === 'small' ? ' rc-steps-small' : '') }, | ||
{ className: 'rc-steps' + (this.state.init ? '' : ' rc-steps-init') + (props.size === 'small' ? ' rc-steps-small' : '') }, | ||
React.Children.map(children, function (ele, idx) { | ||
@@ -70,0 +72,0 @@ var np = { |
{ | ||
"name": "rc-steps", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "steps ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
18628
8
0
55
0
729