Intro.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. import React from 'react';
  2. import { ImageBackground, StyleSheet, View, TouchableOpacity, Image } from 'react-native';
  3. import { Text, } from 'react-native-paper'
  4. import 'react-native-get-random-values';
  5. const Intro = ({navigation}) => {
  6. const goToLogin = () => {
  7. navigation.navigate("Login");
  8. }
  9. const goToRegistration = () => {
  10. navigation.navigate("Credentials");
  11. }
  12. return(
  13. <ImageBackground style={styles.container} source={require('../assets/cover.jpg')}>
  14. <View style={[styles.brandContainer, styles.center]}>
  15. <Image style={styles.logo} source={require('../assets/logo-white.png')}></Image>
  16. <Text style={[styles.center, styles.title]} >Click & Push</Text>
  17. </View>
  18. <View style={styles.btnContainer}>
  19. <TouchableOpacity style={styles.loginBtn} onPress={goToLogin} >
  20. <Text style={{ color: 'white', fontSize: 15 }}>Login</Text>
  21. </TouchableOpacity>
  22. <TouchableOpacity style={styles.registerBtn} onPress={goToRegistration} >
  23. <Text style={{ color: 'white', fontSize: 15 }}>Create Account</Text>
  24. </TouchableOpacity>
  25. </View>
  26. </ImageBackground>
  27. )
  28. }
  29. const styles = StyleSheet.create({
  30. container: {
  31. flex: 1,
  32. flexDirection: 'column',
  33. resizeMode: 'cover',
  34. justifyContent: 'space-evenly'
  35. },
  36. center: {
  37. alignItems: 'center',
  38. justifyContent: 'center',
  39. },
  40. brandContainer: {
  41. height: 200,
  42. marginVertical: 50,
  43. flexDirection: 'column',
  44. justifyContent: 'space-between'
  45. },
  46. title: {
  47. fontFamily: 'RacingSansOne-Regular',
  48. marginTop: 30,
  49. color: 'white',
  50. fontSize: 30
  51. },
  52. textContainer: {
  53. marginHorizontal: 20,
  54. borderRadius: 50,
  55. },
  56. textInput: {
  57. marginBottom: 10,
  58. paddingLeft: 30,
  59. borderRadius: 50,
  60. overflow: 'hidden',
  61. backgroundColor: 'white',
  62. height: 50
  63. },
  64. loginBtn: {
  65. borderRadius: 50,
  66. width: 170,
  67. marginLeft: 10,
  68. justifyContent: 'center',
  69. backgroundColor: '#df3f3f',
  70. height: 60,
  71. alignItems: 'center'
  72. },
  73. registerBtn: {
  74. width: 170,
  75. marginRight: 10,
  76. borderColor: 'white',
  77. borderWidth: 2,
  78. borderRadius: 50,
  79. justifyContent: 'center',
  80. backgroundColor: 'transparent',
  81. height: 60,
  82. alignItems: 'center'
  83. },
  84. btnContainer: {
  85. flexDirection: 'row-reverse',
  86. justifyContent: 'center'
  87. },
  88. })
  89. export default Intro;