@umituz/react-native-onboarding 2.7.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-onboarding",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "Advanced onboarding flow for React Native apps with personalization questions, theme-aware colors, animations, and customizable slides. SOLID, DRY, KISS principles applied.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -6,6 +6,7 @@
6
6
 
7
7
  import React, { useMemo } from "react";
8
8
  import { View, TouchableOpacity, Text, StyleSheet } from "react-native";
9
+ import { ArrowLeft } from "lucide-react-native";
9
10
  import { useLocalization } from "@umituz/react-native-localization";
10
11
  import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
11
12
 
@@ -34,24 +35,34 @@ export const OnboardingHeader: React.FC<OnboardingHeaderProps> = ({
34
35
 
35
36
  const skipText = skipButtonText || t("onboarding.skip", "Skip");
36
37
 
38
+ const handleBackPress = () => {
39
+ if (!isFirstSlide) {
40
+ onBack();
41
+ }
42
+ };
43
+
37
44
  return (
38
45
  <View style={styles.header}>
39
46
  {showBackButton ? (
40
47
  <TouchableOpacity
41
- onPress={onBack}
48
+ onPress={handleBackPress}
42
49
  disabled={isFirstSlide}
43
50
  style={[
44
51
  styles.headerButton,
45
52
  isFirstSlide && styles.headerButtonDisabled,
46
53
  ]}
54
+ activeOpacity={0.7}
47
55
  >
48
- <Text style={styles.headerButtonText}>←</Text>
56
+ <ArrowLeft
57
+ size={20}
58
+ color={useGradient ? "#FFFFFF" : tokens.colors.textPrimary}
59
+ />
49
60
  </TouchableOpacity>
50
61
  ) : (
51
62
  <View style={styles.headerButton} />
52
63
  )}
53
64
  {showSkipButton && (
54
- <TouchableOpacity onPress={onSkip}>
65
+ <TouchableOpacity onPress={onSkip} activeOpacity={0.7}>
55
66
  <Text style={styles.skipText}>{skipText}</Text>
56
67
  </TouchableOpacity>
57
68
  )}
@@ -89,11 +100,6 @@ const getStyles = (
89
100
  headerButtonDisabled: {
90
101
  opacity: 0.3,
91
102
  },
92
- headerButtonText: {
93
- color: useGradient ? "#FFFFFF" : tokens.colors.textPrimary,
94
- fontSize: 20,
95
- fontWeight: "bold",
96
- },
97
103
  skipText: {
98
104
  color: useGradient ? "#FFFFFF" : tokens.colors.textPrimary,
99
105
  fontSize: 16,
@@ -84,3 +84,7 @@ const getStyles = (
84
84
  },
85
85
  });
86
86
 
87
+
88
+
89
+
90
+