Advertisement
joygabriel21

Justify Content

Jan 22nd, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. import React from "react";
  2. import { StyleSheet, View } from "react-native";
  3.  
  4. export default class Layout extends React.Component {
  5. render() {
  6. return (
  7. <View style={styles.container}>
  8. <View style={[styles.box, styles.box1]} />
  9. <View style={[styles.box, styles.box2]} />
  10. <View style={[styles.box, styles.box3]} />
  11. </View>
  12. );
  13. }
  14. }
  15.  
  16. const styles = StyleSheet.create({
  17. container: {
  18. flex: 1,
  19. flexDirection: "column",
  20. justifyContent: "flex-start"
  21. },
  22. box: {
  23. height: 100
  24. },
  25. box1: {
  26. backgroundColor: "#2196F3"
  27. },
  28. box2: {
  29. backgroundColor: "#8BC34A"
  30. },
  31. box3: {
  32. backgroundColor: "#e3aa1a"
  33. }
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement