Skip to content

Instantly share code, notes, and snippets.

@nirsky
Created July 24, 2017 10:16
Show Gist options
  • Save nirsky/81fb71c8cd2be521eda0a5bda6f400ce to your computer and use it in GitHub Desktop.
Save nirsky/81fb71c8cd2be521eda0a5bda6f400ce to your computer and use it in GitHub Desktop.
const FlexExample = () =>
<View style={[styles.container, {flex: 1}]}>
<View style={{flex: 16}}/>
<View style={{flexDirection: 'row', flex: 68}}>
<View style={{flex: 1}}/>
<View style={[styles.box, {flex: 8}]}>
<Text style={styles.title}>Awesome Blog Post Page</Text>
<Text style={styles.text}>{loremIpsum}</Text>
<View style={styles.buttonsContainer}>
<TouchableOpacity style={styles.button}>
<Text style={styles.buttonText}>Accept</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button}>
<Text style={styles.buttonText}>Decline</Text>
</TouchableOpacity>
</View>
</View>
<View style={{flex: 1}}/>
</View>
<View style={{flex: 16}}/>
</View>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment