Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Welcome.jsx 2.7KB

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