Intro.js 2.5 KB

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