mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2025-01-20 20:49:39 +00:00
Merge pull request #18 from nickhudkins/feature/0.12.0-rc-compat
Feature/0.12.0 rc compat
This commit is contained in:
commit
5a208de0ef
@ -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;
|
||||
|
@ -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"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user