rc-animate
Advanced tools
Comparing version 2.1.0 to 2.2.0
# History | ||
---- | ||
## 2.2.0 / 2016-06-28 | ||
- support transitionName as object | ||
## 2.1.0 / 2016-06-16 | ||
- make onEnter/onLeave/onAppear async |
@@ -48,3 +48,3 @@ 'use strict'; | ||
animation: _react2["default"].PropTypes.object, | ||
transitionName: _react2["default"].PropTypes.string, | ||
transitionName: _react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.string, _react2["default"].PropTypes.object]), | ||
transitionEnter: _react2["default"].PropTypes.bool, | ||
@@ -51,0 +51,0 @@ transitionAppear: _react2["default"].PropTypes.bool, |
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _react = require('react'); | ||
@@ -72,2 +74,3 @@ | ||
var transitionName = props.transitionName; | ||
var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object'; | ||
this.stop(); | ||
@@ -79,3 +82,4 @@ var end = function end() { | ||
if ((_cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { | ||
this.stopper = (0, _cssAnimation2["default"])(node, transitionName + '-' + animationType, end); | ||
var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; | ||
this.stopper = (0, _cssAnimation2["default"])(node, name, end); | ||
} else { | ||
@@ -82,0 +86,0 @@ this.stopper = props.animation[animationType](node, end); |
{ | ||
"name": "rc-animate", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "css-transition ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -76,5 +76,5 @@ # rc-animate | ||
<td>transitionName</td> | ||
<td>String</td> | ||
<td>String|Object</td> | ||
<td></td> | ||
<td>transitionName, need to specify corresponding css</td> | ||
<td>specify corresponding css, see ReactCSSTransitionGroup</td> | ||
</tr> | ||
@@ -81,0 +81,0 @@ <tr> |
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
22995
496