react-native-linear-gradient
Advanced tools
Comparing version 1.1.0-alpha to 1.2.0
@@ -27,8 +27,7 @@ 'use strict'; | ||
componentDidMount: function() { | ||
var self = this; | ||
this.setInterval(function() { | ||
self.setState({ | ||
count: self.state.count + 1, | ||
colorTop: incrementColor(self.state.colorTop, 1), | ||
colorBottom: incrementColor(self.state.colorBottom, -1), | ||
this.setInterval(() => { | ||
this.setState({ | ||
count: this.state.count + 1, | ||
colorTop: incrementColor(this.state.colorTop, 1), | ||
colorBottom: incrementColor(this.state.colorBottom, -1), | ||
}); | ||
@@ -35,0 +34,0 @@ }, 20); |
@@ -9,5 +9,6 @@ { | ||
"dependencies": { | ||
"react-native": "^0.3.10", | ||
"react-native-linear-gradient": "^0.1.7" | ||
"react-native": "0.16.0", | ||
"react-native-linear-gradient": "../../", | ||
"react-timer-mixin": "^0.13.3" | ||
} | ||
} |
@@ -10,3 +10,4 @@ var React = require('react-native'); | ||
colors: PropTypes.array.isRequired, | ||
locations: PropTypes.array | ||
locations: PropTypes.array, | ||
...View.propTypes, | ||
}, | ||
@@ -13,0 +14,0 @@ |
@@ -9,6 +9,10 @@ /** | ||
var React = require('react-native'); | ||
var { requireNativeComponent, processColor } = React; | ||
var { requireNativeComponent, processColor, View } = React; | ||
var NativeLinearGradient = requireNativeComponent('BVLinearGradient', null); | ||
var LinearGradient = React.createClass({ | ||
propTypes: { | ||
...View.propTypes, | ||
}, | ||
render: function() { | ||
@@ -15,0 +19,0 @@ var { colors, ...otherProps } = this.props; |
{ | ||
"name": "react-native-linear-gradient", | ||
"version": "1.1.0-alpha", | ||
"version": "1.2.0", | ||
"description": "A <LinearGradient> element for react-native", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -12,3 +12,3 @@ # react-native-linear-gradient | ||
2. Open your project in XCode, right click on `Libraries` and click `Add | ||
Files to "Your Project Name" [(Screenshot)](http://url.brentvatne.ca/g9Wp). | ||
Files to "Your Project Name"` Look under `node_modules/react-native-linear-gradient` and add `BVLinearGradient.xcodeproj`. [(Screenshot)](http://url.brentvatne.ca/g9Wp). | ||
3. Add `libBVLinearGradient.a` to `Build Phases -> Link Binary With Libraries` | ||
@@ -26,2 +26,4 @@ [(Screenshot)](http://url.brentvatne.ca/g9Wp). | ||
**If you're having trouble, you can point your `package.json` at github to see if the issue has been fixed. Simply change the dependency `"react-native-linear-gradient": "brentvatne/react-native-linear-gradient",` and then `npm install`** | ||
#### Android | ||
@@ -28,0 +30,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2403042
61
205
1
134