Advertisement
tamsenmckerley

weird Flex but ok

Apr 24th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. 5.1.8
  2.  
  3. import React, { Component } from 'react';
  4. import { AppRegistry, Text, View, StyleSheet } from 'react-native';
  5. import { Constants } from 'expo';
  6.  
  7. export default class App extends Component {
  8. render() {
  9. return (
  10. <View style={styles.container}>
  11.  
  12. <View style={styles.flag}>
  13. <View style={styles.blue}>
  14. </View>
  15. <View style={styles.yellow}>
  16. </View>
  17. <View style={styles.red}>
  18. </View>
  19. </View>
  20.  
  21.  
  22. </View>
  23. );
  24. }
  25. }
  26.  
  27. const styles = StyleSheet.create({
  28. container: {
  29. flex: 1,
  30. },
  31. flag: {
  32. flex: 1,
  33. flexDirection: 'row',
  34. },
  35. yellow: {
  36. flex: 1,
  37. backgroundColor: '#FCD116',
  38. },
  39. blue: {
  40. flex: 1,
  41. backgroundColor: '#002B7F',
  42. },
  43. red: {
  44. flex: 1,
  45. backgroundColor: '#CE1126',
  46. },
  47.  
  48. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement