react-skrollr
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -55,6 +55,12 @@ 'use strict'; | ||
value: function initSkrollr() { | ||
this.skrollr = _skrollr2.default.init(this.props.init); | ||
this.setState({ | ||
refresh: this.skrollr.refresh | ||
}); | ||
if (this.props.disableOnMobile && this.skrollr.isMobile()) { | ||
this.skrollr.destroy(); | ||
} | ||
} | ||
@@ -96,6 +102,8 @@ }, { | ||
init: _propTypes2.default.object, | ||
getScrollTop: _propTypes2.default.func | ||
getScrollTop: _propTypes2.default.func, | ||
disableOnMobile: _propTypes2.default.bool | ||
}; | ||
ParallaxProvider.defaultProps = { | ||
init: {}, | ||
disableOnMobile: true, | ||
getScrollTop: function getScrollTop() { | ||
@@ -102,0 +110,0 @@ return null; |
{ | ||
"name": "react-skrollr", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "React Component parallax scrolling JavaScript library base on Skrollr", | ||
@@ -32,5 +32,7 @@ "main": "lib/index.js", | ||
"babel-cli": "^6.26.0", | ||
"babel-plugin-transform-class-properties": "^6.24.1", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"react": "16.0.0", | ||
@@ -37,0 +39,0 @@ "react-dom": "16.0.0", |
@@ -26,3 +26,3 @@ # React Skrollr | ||
Add `<ProviderParallax>` in to root app | ||
Add `ParallaxProvider` into root app | ||
```js | ||
@@ -40,3 +40,3 @@ class App extends React.Component { | ||
... | ||
</ParallaxProvider> | ||
</> | ||
) | ||
@@ -43,0 +43,0 @@ } |
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
10668
155
10