@umituz/react-native-onboarding 3.5.2 → 3.5.3
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": "3.5.
|
|
3
|
+
"version": "3.5.3",
|
|
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",
|
|
@@ -18,6 +18,7 @@ import { useOnboardingTheme } from "../providers/OnboardingThemeProvider";
|
|
|
18
18
|
|
|
19
19
|
export interface OnboardingScreenContentProps {
|
|
20
20
|
containerStyle?: any;
|
|
21
|
+
useGradient: boolean;
|
|
21
22
|
currentSlide: OnboardingSlide | undefined;
|
|
22
23
|
isFirstSlide: boolean;
|
|
23
24
|
isLastSlide: boolean;
|
|
@@ -58,6 +59,7 @@ export interface OnboardingScreenContentProps {
|
|
|
58
59
|
|
|
59
60
|
export const OnboardingScreenContent = ({
|
|
60
61
|
containerStyle,
|
|
62
|
+
useGradient,
|
|
61
63
|
currentSlide,
|
|
62
64
|
isFirstSlide,
|
|
63
65
|
isLastSlide,
|
|
@@ -85,7 +87,7 @@ export const OnboardingScreenContent = ({
|
|
|
85
87
|
variant = "default",
|
|
86
88
|
}: OnboardingScreenContentProps) => {
|
|
87
89
|
const { themeMode } = useTheme();
|
|
88
|
-
|
|
90
|
+
/* useGradient is now passed as a prop */
|
|
89
91
|
|
|
90
92
|
const hasMedia = !!currentSlide?.backgroundImage || !!currentSlide?.backgroundVideo;
|
|
91
93
|
const overlayOpacity = currentSlide?.overlayOpacity ?? 0.5;
|
|
@@ -39,25 +39,27 @@ export const OnboardingThemeProvider = ({
|
|
|
39
39
|
|
|
40
40
|
const colors = useMemo<OnboardingColors>(() => {
|
|
41
41
|
if (useGradient) {
|
|
42
|
+
// For gradient backgrounds (Christmas gradients), use white text
|
|
42
43
|
return {
|
|
43
|
-
iconColor:
|
|
44
|
-
textColor:
|
|
45
|
-
subTextColor:
|
|
46
|
-
buttonBg:
|
|
44
|
+
iconColor: "#FFFFFF",
|
|
45
|
+
textColor: "#FFFFFF",
|
|
46
|
+
subTextColor: "rgba(255, 255, 255, 0.85)",
|
|
47
|
+
buttonBg: "#FFFFFF",
|
|
47
48
|
buttonTextColor: tokens.colors.primary,
|
|
48
|
-
progressBarBg:
|
|
49
|
-
progressFillColor:
|
|
50
|
-
dotColor:
|
|
51
|
-
activeDotColor:
|
|
52
|
-
progressTextColor:
|
|
53
|
-
headerButtonBg:
|
|
54
|
-
headerButtonBorder:
|
|
55
|
-
iconBg:
|
|
56
|
-
iconBorder:
|
|
57
|
-
errorColor:
|
|
49
|
+
progressBarBg: "rgba(255, 255, 255, 0.25)",
|
|
50
|
+
progressFillColor: "#FFFFFF",
|
|
51
|
+
dotColor: "rgba(255, 255, 255, 0.4)",
|
|
52
|
+
activeDotColor: "#FFFFFF",
|
|
53
|
+
progressTextColor: "rgba(255, 255, 255, 0.85)",
|
|
54
|
+
headerButtonBg: "rgba(255, 255, 255, 0.2)",
|
|
55
|
+
headerButtonBorder: "rgba(255, 255, 255, 0.35)",
|
|
56
|
+
iconBg: "rgba(255, 255, 255, 0.2)",
|
|
57
|
+
iconBorder: "rgba(255, 255, 255, 0.35)",
|
|
58
|
+
errorColor: "#FFCDD2",
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
// For non-gradient backgrounds, use theme colors
|
|
61
63
|
return {
|
|
62
64
|
iconColor: tokens.colors.primary,
|
|
63
65
|
textColor: tokens.colors.textPrimary,
|
|
@@ -118,6 +118,7 @@ export const OnboardingScreen = ({
|
|
|
118
118
|
<OnboardingThemeProvider useGradient={useGradient}>
|
|
119
119
|
<OnboardingScreenContent
|
|
120
120
|
containerStyle={[styles.container, containerStyle]}
|
|
121
|
+
useGradient={useGradient}
|
|
121
122
|
currentSlide={currentSlide}
|
|
122
123
|
isFirstSlide={isFirstSlide}
|
|
123
124
|
isLastSlide={isLastSlide}
|