Socket
Socket
Sign inDemoInstall

rc-collapse

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-collapse - npm Package Compare versions

Comparing version 1.4.6 to 1.5.0

lib/openAnimationFactory.js

13

lib/Collapse.js

@@ -17,5 +17,5 @@ 'use strict';

var _openAnimation = require('./openAnimation');
var _openAnimationFactory = require('./openAnimationFactory');
var _openAnimation2 = _interopRequireDefault(_openAnimation);
var _openAnimationFactory2 = _interopRequireDefault(_openAnimationFactory);

@@ -41,3 +41,2 @@ var Collapse = (0, _react.createClass)({

onChange: function onChange() {},
openAnimation: _openAnimation2['default'],
accordion: false

@@ -59,2 +58,3 @@ };

return {
openAnimation: this.props.openAnimation || (0, _openAnimationFactory2['default'])(this.props.prefixCls),
activeKey: activeKey || defaultActiveKey

@@ -70,2 +70,7 @@ };

}
if ('openAnimation' in nextProps) {
this.setState({
openAnimation: nextProps.openAnimation
});
}
},

@@ -136,3 +141,3 @@

prefixCls: prefixCls,
openAnimation: _this2.props.openAnimation,
openAnimation: _this2.state.openAnimation,
children: child.props.children,

@@ -139,0 +144,0 @@ onItemClick: _this2.onClickItem(key).bind(_this2)

@@ -9,4 +9,2 @@ 'use strict';

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var _react = require('react');

@@ -16,5 +14,5 @@

var _classnames2 = require('classnames');
var _PanelContent = require('./PanelContent');
var _classnames3 = _interopRequireDefault(_classnames2);
var _PanelContent2 = _interopRequireDefault(_PanelContent);

@@ -51,4 +49,2 @@ var _rcAnimate = require('rc-animate');

render: function render() {
var _classnames;
var _props = this.props;

@@ -61,4 +57,2 @@ var prefixCls = _props.prefixCls;

var headerCls = prefixCls + '-header';
var contentCls = (0, _classnames3['default'])((_classnames = {}, _defineProperty(_classnames, prefixCls + '-content', true), _defineProperty(_classnames, prefixCls + '-content-active', isActive), _classnames));
return _react2['default'].createElement(

@@ -76,15 +70,12 @@ 'div',

_rcAnimate2['default'],
{ showProp: 'data-active',
{
showProp: 'isActive',
exclusive: true,
animation: this.props.openAnimation },
component: '',
animation: this.props.openAnimation
},
_react2['default'].createElement(
'div',
{ className: contentCls,
'data-active': isActive,
role: 'tabpanel' },
_react2['default'].createElement(
'div',
{ className: prefixCls + '-content-box' },
children
)
_PanelContent2['default'],
{ prefixCls: prefixCls, isActive: isActive },
children
)

@@ -91,0 +82,0 @@ )

{
"name": "rc-collapse",
"version": "1.4.6",
"version": "1.5.0",
"description": "rc-collapse ui component for react",

@@ -49,3 +49,3 @@ "keywords": [

"react": "0.14.x",
"react-dom":"0.14.x",
"react-dom": "0.14.x",
"react-addons-test-utils": "0.14.x",

@@ -60,4 +60,4 @@ "string.prototype.repeat": "^0.2.0"

"rc-animate": "2.x",
"velocity-animate": "1.x"
"css-animation": "1.x"
}
}

Sorry, the diff of this file is not supported yet

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