Advertisement
Felanpro

React Native (WelcomeScreen)

May 15th, 2023
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. import React from 'react';
  2. import { ImageBackground, StyleSheet, View, flexDirection, Image, Text, aligntItems } from 'react-native';
  3.  
  4. function WelcomeScreen(props) {
  5. return (
  6. <ImageBackground
  7. style = {styles.background}
  8. source={require("../assets/background.jpg")}
  9. >
  10.  
  11. <View style={styles.logoTextContainer}>
  12.  
  13. <Image style = {styles.logo} source={require("../assets/logo-red.png")}></Image>
  14. <Text>Sell What You Don't Need</Text>
  15.  
  16. </View>
  17.  
  18.  
  19. <View style = {styles.loginButton}>
  20.  
  21. </View>
  22.  
  23. <View style = {styles.registerButton}>
  24.  
  25. </View>
  26.  
  27. </ImageBackground>
  28. );
  29. }
  30.  
  31. const styles = StyleSheet.create({
  32. background: {
  33. flex: 1,
  34. justifyContent: "flex-end",
  35. alignItems: "center"
  36. },
  37. loginButton: {
  38. width: "100%",
  39. height: 70,
  40. backgroundColor: "#fc5c65",
  41. },
  42. registerButton: {
  43. width: "100%",
  44. height: 70,
  45. backgroundColor: "#4ecdc4",
  46. },
  47. logo: {
  48. width: 100,
  49. height: 100,
  50. },
  51. logoTextContainer: {
  52. position: "absolute",
  53. top: 70,
  54. alignItems: "center"
  55. }
  56. })
  57.  
  58. export default WelcomeScreen;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement