Advertisement
armadiazrino

Header.js

Nov 29th, 2020
739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from "react"
  2. import { StyleSheet, Text, View } from "react-native"
  3.  
  4. const Header = (props) => {
  5.   return (
  6.     <View style={styles.mainContainer}>
  7.       <View style={styles.textContainer}>
  8.         <Text style={styles.titleText}>{props.title}</Text>
  9.         <Text style={styles.subtitleText}>{props.time}</Text>
  10.       </View>
  11.     </View>
  12.   )
  13. }
  14.  
  15. const styles = StyleSheet.create({
  16.   mainContainer: {
  17.     padding: 8,
  18.     backgroundColor: "rgb(239,81,83)",
  19.     aspectRatio: 2,
  20.   },
  21.   textContainer: {
  22.     alignItems: "center",
  23.     justifyContent: "center",
  24.     flex: 1,
  25.   },
  26.   titleText: {
  27.     fontSize: 28,
  28.     color: "rgb(255,248,222)",
  29.   },
  30.   subtitleText: {
  31.     fontSize: 36,
  32.     color: "rgb(255,248,222)",
  33.     fontWeight: "bold"
  34.   },
  35. })
  36.  
  37. export default Header
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement