Change to new style of requireNativeComponent
This commit is contained in:
parent
e62edb41a2
commit
d7ae5eac60
|
@ -5,19 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var ReactNativeViewAttributes = require('ReactNativeViewAttributes');
|
||||
var createReactNativeComponentClass = require('createReactNativeComponentClass');
|
||||
var merge = require('merge');
|
||||
var deepDiffer = require('deepDiffer');
|
||||
|
||||
var LinearGradient = createReactNativeComponentClass({
|
||||
validAttributes: merge(ReactNativeViewAttributes.UIView, {
|
||||
colors: {diff: deepDiffer},
|
||||
start: {diff: deepDiffer},
|
||||
end: {diff: deepDiffer},
|
||||
locations: {diff: deepDiffer},
|
||||
}),
|
||||
uiViewClassName: 'BVLinearGradient',
|
||||
});
|
||||
var { requireNativeComponent, } = require('react-native');
|
||||
var LinearGradient = requireNativeComponent('BVLinearGradient', null);
|
||||
|
||||
module.exports = LinearGradient;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"url": "git@github.com:brentvatne/react-native-linear-gradient.git"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react-native": "^0.4.3"
|
||||
"react-native": "^0.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest-cli": "0.2.1"
|
||||
|
|
Loading…
Reference in New Issue