Comparing version 1.2.4 to 1.3.0
# History | ||
---- | ||
## 1.3 | ||
* add `current` property of `Steps` | ||
## 1.2.3 | ||
@@ -5,0 +9,0 @@ |
@@ -10,2 +10,3 @@ 'use strict'; | ||
var props = this.props; | ||
var status = props.status || 'wait'; | ||
var prefixCls = props.prefixCls; | ||
@@ -15,3 +16,3 @@ var iconPrefix = props.iconPrefix; | ||
var iconName = props.icon ? props.icon : 'check'; | ||
var icon = !props.icon && props.status !== 'finish' ? React.createElement( | ||
var icon = !props.icon && status !== 'finish' ? React.createElement( | ||
'span', | ||
@@ -23,3 +24,3 @@ { className: prefixCls + '-icon' }, | ||
'div', | ||
{ className: prefixCls + '-item ' + (props.stepLast ? prefixCls + '-item-last ' : '') + prefixCls + '-status-' + props.status + (props.icon ? ' ' + prefixCls + '-custom' : ''), style: { width: props.tailWidth } }, | ||
{ className: prefixCls + '-item ' + (props.stepLast ? prefixCls + '-item-last ' : '') + prefixCls + '-status-' + status + (props.icon ? ' ' + prefixCls + '-custom' : ''), style: { width: props.tailWidth } }, | ||
!props.stepLast ? React.createElement( | ||
@@ -26,0 +27,0 @@ 'div', |
@@ -21,3 +21,4 @@ 'use strict'; | ||
maxDescriptionWidth: 120, | ||
direction: '' | ||
direction: '', | ||
current: 0 | ||
}; | ||
@@ -118,2 +119,5 @@ }, | ||
}; | ||
if (!ele.props.status) { | ||
np.status = idx === props.current ? 'process' : idx < props.current ? 'finish' : 'wait'; | ||
} | ||
return React.cloneElement(ele, np); | ||
@@ -120,0 +124,0 @@ }, this) |
{ | ||
"name": "rc-steps", | ||
"version": "1.2.4", | ||
"version": "1.3.0", | ||
"description": "steps ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
23760
892
0