Created
November 26, 2015 02:48
-
-
Save andyyou/fe7bcff8edd5eef0bb5f to your computer and use it in GitHub Desktop.
react-native-issue-sample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require('react-native'); | |
var { | |
StyleSheet, | |
View, | |
Text, | |
ScrollView, | |
} = React; | |
var Sandbox = React.createClass({ | |
render: function () { | |
return ( | |
<ScrollView style={styles.container}> | |
<View style={styles.father}> | |
<Text>Hello sandbox</Text> | |
<Text>Hello sandbox</Text> | |
<Text>Hello sandbox</Text> | |
<Text>Hello sandbox</Text> | |
<Text>Hello sandbox</Text> | |
<Text>Hello sandbox</Text> | |
<View style={styles.son}> | |
<View style={styles.grandson}><Text>A</Text></View> | |
<View style={styles.grandson}><Text>B</Text></View> | |
<View style={styles.grandson}><Text>C</Text></View> | |
<View style={styles.grandson}><Text>D</Text></View> | |
<View style={styles.grandson}><Text>E</Text></View> | |
<View style={styles.grandson}><Text>F</Text></View> | |
</View> | |
</View> | |
</ScrollView> | |
); | |
}, | |
}); | |
var styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
marginTop: 20, | |
}, | |
father: { | |
backgroundColor: 'rgba(255, 255, 0, .2)', | |
padding: 20, | |
}, | |
son: { | |
position: 'absolute', | |
top: 0, | |
left: 0, | |
right: 0, | |
bottom: 0, | |
backgroundColor: 'rgba(0, 255, 255, .6)', | |
flexDirection: 'row', | |
justifyContent: 'center', | |
}, | |
grandson: { | |
flex: 1, | |
height: 50, | |
backgroundColor: 'rgba(0, 0, 0, .5)', | |
}, | |
}); | |
module.exports = Sandbox; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment