App08FlexLayout.js 556 B

1234567891011121314151617
  1. import React from 'react';
  2. import { View } from 'react-native';
  3. class FlexDirectionBasics extends React.Component {
  4. render() {
  5. return (
  6. // Try with height: 300 instead of flex: 1
  7. <View style={{ flex: 1, flexDirection: 'column' }}>
  8. <View style={{ height: 50, width: 50, backgroundColor: 'powderblue' }} />
  9. <View style={{ height: 50, width: 50, backgroundColor: 'skyblue' }} />
  10. <View style={{ height: 50, width: 50, backgroundColor: 'steelblue' }} />
  11. </View>
  12. );
  13. }
  14. }
  15. export default FlexDirectionBasics;