Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import { AppRegistry, View } from 'react-native';
  3.  
  4. class FlexDirectionBasics extends Component {
  5. render() {
  6. return (
  7. // Try setting `flexDirection` to `column`.
  8. <View style={{flex: 1, height: '50px', backgroundColor: 'yellow'}}>
  9. <View style={{flex: 0.33, width: '80%', height: '0px', backgroundColor: 'yellow'}} />
  10. <View style={{flex: 1, flexDirection: 'column', justifyContent: 'space-around',alignItems:'center', backgroundColor: 'red'}}>
  11. <View style={{flex: 0.33, width: '80%', height: '50px', backgroundColor: 'yellow'}} />
  12. <View style={{ width: '80%', height: '50px', backgroundColor: 'green'}} />
  13. <View style={{flex: 0.33, width: '80%', height: '50px', backgroundColor: 'powderblue'}} />
  14. </View>
  15. <View style={{flex: 0.33, width: '100%', height: '50px', backgroundColor: 'yellow'}}>
  16. <View style={{flex: 1, width: '100%', alignItems: 'center', justifyContent: 'space-around', height: '50px', backgroundColor: 'blue'}}>
  17. <View style={{flex: 0.33, width: '80%', height: '30px', backgroundColor: 'powderblue'}} />
  18. <View style={{flex: 0.33, width: '80%', height: '30px', backgroundColor: 'powderblue'}} />
  19. </View>
  20. </View>
  21. </View>
  22. );
  23. }
  24. };
  25.  
  26. AppRegistry.registerComponent('AwesomeProject', () => FlexDirectionBasics);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement