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