YorKnEz

Landing.js

Dec 23rd, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. import React from "react";
  2. import { View, Text, Image } from "react-native";
  3. import { Button } from "native-base";
  4.  
  5. var landingTop = require("../assets/landingTop.jpeg");
  6. var landingBottom = require("../assets/landingBottom.jpeg");
  7.  
  8. class Landing extends React.Component {
  9. render() {
  10. return (
  11. <View style={styles.container}>
  12. <Image
  13. source={landingTop}
  14. style={styles.landingImage}
  15. />
  16. <View style={styles.viewStyle}>
  17. <Text
  18. style={styles.titleStyle}
  19. >Welcome to PokeSearch</Text>
  20. <Button
  21. block={true}
  22. style={styles.buttonStyle}
  23. onPress={() => {}}
  24. >
  25. <Text style={styles.buttonText}>Start Searching</Text>
  26. </Button>
  27. </View>
  28. <Image
  29. source={landingBottom}
  30. style={styles.landingImage}
  31. />
  32. </View>
  33. );
  34. }
  35. }
  36.  
  37. const styles = {
  38. container: {
  39. flex: 1,
  40. backgroundColor: 'yellow',
  41. },
  42. viewStyle: {
  43. flex: 1,
  44. flexDirection: "column",
  45. justifyContent: "center",
  46. alignItems: "center",
  47. },
  48. landingImage: {
  49. width: '100%'
  50. },
  51. titleStyle: {
  52. fontSize: 30,
  53. color: "blue",
  54. alignItems: "center",
  55. },
  56. buttonStyle: {
  57. margin: 10,
  58. },
  59. buttonText: {
  60. color: "#fff",
  61. },
  62. };
  63.  
  64. export default Landing;
  65.  
Advertisement
Add Comment
Please, Sign In to add comment