17 lines
491 B
JavaScript
17 lines
491 B
JavaScript
import React from 'react';
|
|
import { View } from 'react-native';
|
|
|
|
class FlexDimensionsBasics extends React.Component {
|
|
render() {
|
|
return (
|
|
// Try with height: 300 instead of flex: 1
|
|
<View style={{ flex: 1 }}>
|
|
<View style={{ flex: 1, backgroundColor: 'powderblue' }} />
|
|
<View style={{ flex: 2, backgroundColor: 'skyblue' }} />
|
|
<View style={{ flex: 3, backgroundColor: 'steelblue' }} />
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default FlexDimensionsBasics;
|