Skip to content

Instantly share code, notes, and snippets.

@jhsu
Created September 25, 2015 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhsu/5f692fa7948524f0bbc1 to your computer and use it in GitHub Desktop.
Save jhsu/5f692fa7948524f0bbc1 to your computer and use it in GitHub Desktop.
const ExampleApp = React.createClass({
render: function() {
return (
<View style={styles.container}>
<View style={styles.borderH}></View>
<View style={styles.contentH}>
<View style={styles.contentV}>
<View style={styles.contentH}>
<View style={styles.borderV}>
</View>
<View style={styles.contentV}>
<Text>content</Text>
</View>
</View>
<View style={styles.borderH}>
</View>
</View>
<View style={styles.borderV}>
</View>
</View>
</View>
);
}
});
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
marginTop: 20
},
borderH: {
height: 20,
backgroundColor: 'blue'
},
borderV: {
width: 20,
backgroundColor: 'green'
},
contentH: {
flex: 1,
backgroundColor: '#efefef',
flexDirection: 'row'
},
contentV: {
flex: 1
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment