Merge pull request #18 from nickhudkins/feature/0.12.0-rc-compat

Feature/0.12.0 rc compat
This commit is contained in:
Brent Vatne 2015-09-29 10:07:08 -07:00
commit 5a208de0ef
2 changed files with 12 additions and 5 deletions

View File

@ -5,7 +5,17 @@
'use strict';
var { requireNativeComponent, } = require('react-native');
var LinearGradient = requireNativeComponent('BVLinearGradient', null);
var React = require('react-native');
var { requireNativeComponent, processColor } = React;
var NativeLinearGradient = requireNativeComponent('BVLinearGradient', null);
var LinearGradient = React.createClass({
render: function() {
var { colors, ...otherProps } = this.props;
return (
<NativeLinearGradient {...otherProps} colors={colors.map(processColor)} />
);
}
});
module.exports = LinearGradient;

View File

@ -12,9 +12,6 @@
"type": "git",
"url": "git@github.com:brentvatne/react-native-linear-gradient.git"
},
"peerDependencies": {
"react-native": ">= 0.4.4"
},
"devDependencies": {
"jest-cli": "0.2.1"
}