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.

OnboardingScreen.jsx 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import React from "react";
  2. import { View, Text, TouchableOpacity, StyleSheet, Image } from "react-native";
  3. import MaterialIcons from "@expo/vector-icons/MaterialIcons";
  4. import Layout from "@components/Layout/Layout";
  5. import { useTranslation } from "react-i18next";
  6. import { useTheme } from "@styles";
  7. const OnboardingScreen = ({ navigation }) => {
  8. const { t } = useTranslation();
  9. const { isDark } = useTheme();
  10. return (
  11. <Layout>
  12. <View style={styles.container}>
  13. <View style={{ marginTop: 20 }}>
  14. <Text
  15. style={[styles.headText, { color: isDark ? "#fff" : "#20315f" }]}
  16. >
  17. DILIGENT
  18. </Text>
  19. </View>
  20. <View style={styles.logo}>
  21. <Image
  22. style={{ width: 300, height: 300 }}
  23. source={require("../assets/images/diligent-logo.png")}
  24. />
  25. </View>
  26. <TouchableOpacity
  27. style={styles.button}
  28. onPress={() => navigation.navigate("Login")}
  29. >
  30. <Text style={styles.buttonText}>{t("common.letsBegin")}</Text>
  31. <MaterialIcons name="arrow-forward-ios" size={22} color="#fff" />
  32. </TouchableOpacity>
  33. </View>
  34. </Layout>
  35. );
  36. };
  37. const styles = StyleSheet.create({
  38. container: {
  39. flex: 1,
  40. justifyContent: "center",
  41. alignItems: "center",
  42. },
  43. headText: {
  44. fontWeight: "bold",
  45. fontSize: 70,
  46. fontFamily: "poppins-semibold",
  47. },
  48. logo: {
  49. flex: 1,
  50. justifyContent: "center",
  51. alignItems: "center",
  52. },
  53. button: {
  54. backgroundColor: "#AD40AF",
  55. padding: 20,
  56. width: "90%",
  57. borderRadius: 10,
  58. marginBottom: 50,
  59. flexDirection: "row",
  60. justifyContent: "space-between",
  61. },
  62. buttonText: {
  63. color: "white",
  64. fontSize: 18,
  65. textAlign: "center",
  66. fontWeight: "bold",
  67. fontFamily: "poppins-regular",
  68. },
  69. });
  70. export default OnboardingScreen;