next-page-transitions
Advanced tools
Comparing version 1.0.0-beta.1 to 1.0.0-beta.2
@@ -306,2 +306,3 @@ "use strict"; | ||
var _this$props2 = this.props, | ||
Tag = _this$props2.tag, | ||
timeout = _this$props2.timeout, | ||
@@ -350,3 +351,3 @@ loadingComponent = _this$props2.loadingComponent, | ||
} | ||
}, _react.default.createElement("div", { | ||
}, _react.default.createElement(Tag, { | ||
className: containerClassName | ||
@@ -373,2 +374,6 @@ }, children && _react.default.cloneElement(children, _defineProperty({}, loadingCallbackName, function () { | ||
PageTransition.propTypes = { | ||
tag: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string, _propTypes.default.shape({ | ||
$$typeof: _propTypes.default.symbol, | ||
render: _propTypes.default.func | ||
})]), | ||
children: _propTypes.default.node.isRequired, | ||
@@ -421,2 +426,3 @@ classNames: _propTypes.default.string.isRequired, | ||
PageTransition.defaultProps = { | ||
tag: 'div', | ||
loadingComponent: null, | ||
@@ -423,0 +429,0 @@ loadingCallbackName: 'pageTransitionReadyToEnter', |
{ | ||
"name": "next-page-transitions", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0-beta.2", | ||
"description": "Simple and customizable page transitions for Next.js apps", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -5,2 +5,4 @@ # next-page-transitions | ||
![npm version](https://img.shields.io/npm/v/next-page-transitions.svg?style=flat-square) | ||
**Demo:** https://next-page-transitions.now.sh/ | ||
@@ -209,3 +211,8 @@ | ||
"enter" and "exit" classes are needed. | ||
* **`timeout`**: Specifies timeouts for the page transition animations. | ||
* **`tag`**: Specifies the tag or component that will be used to render the | ||
page wrapper. This element will receive the `classNames` prop. This is useful | ||
if you want to use semantic markup, e.g. if you want to render the page | ||
wrapper as `main`, or if you need to further customize the styling or | ||
behavior of the page wrapper. | ||
* **`timeout`**: Specifies timeouts for the page transition animations. | ||
Analogous to the `timeout` prop of | ||
@@ -212,0 +219,0 @@ `react-transition-group`'s [`CSSTranstition`](http://reactcommunity.org/react-transition-group/css-transition) |
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
30799
370
250