Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2022
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from "react";
  2. import {
  3.   View,
  4.   Text,
  5.   TouchableOpacity,
  6.   ImageBackground,
  7.   StatusBar,
  8. } from "react-native";
  9.  
  10.  
  11. import { LinearGradient } from "expo-linear-gradient";
  12. import { images, COLORS, SIZES, FONTS } from "../constants";
  13.  
  14. const Login = ({ navigation }) => {
  15.   function renderHeader() {
  16.     return (
  17.       <View
  18.         style={{
  19.           height: SIZES.height > 700 ? "65%" : "60%",
  20.         }}
  21.       >
  22.         <ImageBackground
  23.           source={images.loginBackground}
  24.           style={{
  25.             flex: 1,
  26.             justifyContent: "flex-end",
  27.           }}
  28.           resizeMode="cover"
  29.         >
  30.           <LinearGradient
  31.             start={{ x: 0, y: 0 }}
  32.             end={{ x: 0, y: 1 }}
  33.             colors={[COLORS.transparent, COLORS.black]}
  34.             style={{
  35.               height: 200,
  36.               justifyContent: "flex-end",
  37.               paddingHorizontal: SIZES.padding,
  38.             }}
  39.           >
  40.             <Text
  41.               style={{
  42.                 width: "80%",
  43.                 color: COLORS.white,
  44.                 ...FONTS.largeTitle,
  45.                 lineHeight: 45,
  46.               }}
  47.             >
  48.               Make treats for your pets
  49.             </Text>
  50.           </LinearGradient>
  51.         </ImageBackground>
  52.       </View>
  53.     );
  54.   }
  55.  
  56.   return (
  57.     <View
  58.       style={{
  59.         flex: 1,
  60.         backgroundColor: COLORS.black,
  61.       }}
  62.     >
  63.       <StatusBar barStyle="light-content" />
  64.       {renderHeader()}
  65.     </View>
  66.   );
  67. };
  68.  
  69. export default Login;
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement