You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.jsx 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. import React from 'react';
  2. import { View, Text, StyleSheet, Image, Pressable } from 'react-native';
  3. import { Link } from 'expo-router';
  4. import { Button, useTheme } from 'react-native-paper';
  5. import text4uLogo from '@/assets/images/text4ulogo.png'
  6. import text4uTitle from '@/assets/images/text4utitle.png'
  7. const Welcome = () => {
  8. const { colors, button, fonts } = useTheme();
  9. const goToLogin = () => {
  10. console.log("go to login")
  11. }
  12. return (
  13. <View
  14. style={[styles.container, { backgroundColor: colors.background }]}
  15. >
  16. <View style={[styles.logoContainer]}>
  17. <Image style={[styles.logo]} source={text4uLogo}></Image>
  18. <Image style={[styles.logoTitle]} source={text4uTitle}></Image>
  19. </View>
  20. <View style={styles.mainContainer}>
  21. <Text style={[fonts.titleLarge, styles.heading]}>
  22. Notification Made Easy.
  23. </Text>
  24. <Text style={[fonts.titleSmall, styles.subHeading]}>
  25. Empowering you with instant alerts for every important moment!
  26. </Text>
  27. <Pressable style={[button, styles.button]}>
  28. <Link href={"/home"}>
  29. <Text style={styles.buttonLabel}>Get Started</Text>
  30. </Link>
  31. </Pressable>
  32. <Text style={{ ...fonts.titleMedium, ...styles.loginInfo }}>
  33. Already have an account?
  34. <Text style={styles.loginText} onPress={goToLogin}>
  35. Login
  36. </Text>
  37. </Text>
  38. </View>
  39. </View>
  40. );
  41. };
  42. const styles = StyleSheet.create({
  43. container: {
  44. flex: 1,
  45. width: "100%"
  46. },
  47. logoContainer:{
  48. marginTop:"auto",
  49. marginBottom:"auto"
  50. },
  51. logo:{
  52. marginLeft:"auto",
  53. marginRight:"auto"
  54. },
  55. logoTitle:{
  56. marginLeft:"auto",
  57. marginRight:"auto"
  58. },
  59. mainContainer:{
  60. alignItems:"center",
  61. marginTop:"auto",
  62. marginBottom:"auto"
  63. },
  64. heading: {
  65. fontWeight: "bold",
  66. marginBottom: 20,
  67. },
  68. subHeading: {
  69. marginBottom: 20,
  70. maxWidth: "70%",
  71. textAlign: "center",
  72. marginBottom: 36
  73. },
  74. button: {
  75. marginBottom: 36,
  76. marginLeft:"auto",
  77. marginRight:"auto",
  78. backgroundColor:"#DD9C47",
  79. paddingVertical:12,
  80. paddingHorizontal:25,
  81. borderRadius:30
  82. },
  83. buttonLabel: {
  84. fontWeight: "700",
  85. color: "#FFF",
  86. fontSize: 16,
  87. },
  88. loginInfo: {
  89. marginBottom: 20,
  90. maxWidth: "70%",
  91. textAlign: "center",
  92. fontWeight: "bold"
  93. },
  94. loginText: {
  95. marginLeft: 5,
  96. color:"#396868"
  97. }
  98. });
  99. export default Welcome;