Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-steps

Package Overview
Dependencies
Maintainers
4
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-steps - npm Package Compare versions

Comparing version 2.1.5 to 2.2.0

4

HISTORY.md
# History
----
## 2.2.0
* `icon` can be React.Node now.
## 2.1.0

@@ -5,0 +9,0 @@

31

lib/Step.js

@@ -19,2 +19,6 @@ 'use strict';

function isString(str) {
return typeof str === 'string';
}
function Step(props) {

@@ -40,8 +44,21 @@ var _classNames, _classNames2;

var iconClassName = (0, _classnames2["default"])((_classNames = {}, _defineProperty(_classNames, prefixCls + '-icon', true), _defineProperty(_classNames, iconPrefix + 'icon', true), _defineProperty(_classNames, iconPrefix + 'icon-' + icon, icon), _defineProperty(_classNames, iconPrefix + 'icon-check', !icon && status === 'finish'), _defineProperty(_classNames, iconPrefix + 'icon-cross', !icon && status === 'error'), _classNames));
var iconNode = icon || status === 'finish' || status === 'error' ? _react2["default"].createElement('span', { className: iconClassName }) : _react2["default"].createElement(
'span',
{ className: prefixCls + '-icon' },
stepNumber
);
var iconClassName = (0, _classnames2["default"])((_classNames = {}, _defineProperty(_classNames, prefixCls + '-icon', true), _defineProperty(_classNames, iconPrefix + 'icon', true), _defineProperty(_classNames, iconPrefix + 'icon-' + icon, icon && isString(icon)), _defineProperty(_classNames, iconPrefix + 'icon-check', !icon && status === 'finish'), _defineProperty(_classNames, iconPrefix + 'icon-cross', !icon && status === 'error'), _classNames));
var iconNode = void 0;
if (icon && !isString(icon)) {
iconNode = _react2["default"].createElement(
'span',
{ className: prefixCls + '-icon' },
icon
);
} else if (icon || status === 'finish' || status === 'error') {
iconNode = _react2["default"].createElement('span', { className: iconClassName });
} else {
iconNode = _react2["default"].createElement(
'span',
{ className: prefixCls + '-icon' },
stepNumber
);
}
var classString = (0, _classnames2["default"])((_classNames2 = {}, _defineProperty(_classNames2, prefixCls + '-item', true), _defineProperty(_classNames2, prefixCls + '-item-last', stepLast), _defineProperty(_classNames2, prefixCls + '-status-' + status, true), _defineProperty(_classNames2, prefixCls + '-custom', icon), _defineProperty(_classNames2, className, !!className), _classNames2));

@@ -103,3 +120,3 @@ return _react2["default"].createElement(

iconPrefix: _react.PropTypes.string,
icon: _react.PropTypes.string,
icon: _react.PropTypes.node,
adjustMarginRight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]),

@@ -106,0 +123,0 @@ stepLast: _react.PropTypes.bool,

{
"name": "rc-steps",
"version": "2.1.5",
"version": "2.2.0",
"description": "steps ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc