SHARE
TWEET

Justify Content

joygabriel21 Jan 22nd, 2020 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top