react-native-root-siblings
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,4 +5,3 @@ import React, { | ||
View, | ||
AppRegistry, | ||
StaticContainer | ||
AppRegistry | ||
} from 'react-native'; | ||
@@ -62,5 +61,5 @@ | ||
return <View style={styles.container}> | ||
<StaticContainer shouldUpdate={false}> | ||
<SiblingContainer root={true}> | ||
<Origin {...this.props} /> | ||
</StaticContainer> | ||
</SiblingContainer> | ||
{this.getSiblings()} | ||
@@ -67,0 +66,0 @@ </View>; |
@@ -5,6 +5,7 @@ import React, { | ||
View, | ||
cloneElement | ||
cloneElement, | ||
Children | ||
} from 'react-native'; | ||
import onlyChild from 'onlyChild'; | ||
let onlyChild = Children.onlyChild; | ||
@@ -27,5 +28,7 @@ let styles = StyleSheet.create({ | ||
render() { | ||
return cloneElement(onlyChild(this.props.children), { | ||
style: [this.props.children.props.style, styles.offStream] | ||
}); | ||
return this.props.root ? | ||
this.props.children : | ||
cloneElement(onlyChild(this.props.children), { | ||
style: [this.props.children.props.style, styles.offStream] | ||
}); | ||
} | ||
@@ -32,0 +35,0 @@ } |
{ | ||
"version": "1.0.2", | ||
"name": "react-native-root-siblings", | ||
@@ -7,7 +8,7 @@ "repository": { | ||
}, | ||
"version": "1.0.1", | ||
"main": "./index.js", | ||
"description": "react native root sibling elements manager", | ||
"dependencies": { | ||
"jquery-callbacks": "^0.0.1" | ||
"jquery-callbacks": "^0.0.1", | ||
"lodash": "^3.10.0" | ||
}, | ||
@@ -14,0 +15,0 @@ "keywords": [ |
8393
144
2
+ Addedlodash@^3.10.0
+ Addedlodash@3.10.1(transitive)