@umituz/react-native-onboarding 3.6.8 → 3.6.9

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.6.8",
3
+ "version": "3.6.9",
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",
@@ -21,15 +21,20 @@ export function shouldUseGradient(
21
21
  return false;
22
22
  }
23
23
 
24
+ // If there is background media, we always treat it as "dark mode" for accessibility (white text)
25
+ if (slide.backgroundImage || slide.backgroundVideo) {
26
+ return true;
27
+ }
28
+
24
29
  // If global useGradient is true, use gradient if slide has gradient defined
25
30
  if (globalUseGradient === true) {
26
- return slide.gradient !== undefined && slide.gradient.length > 0;
31
+ return !!slide.gradient && slide.gradient.length > 0;
27
32
  }
28
33
 
29
34
  // Otherwise, check slide's own useGradient prop
30
35
  return (
31
36
  slide.useGradient === true &&
32
- slide.gradient !== undefined &&
37
+ !!slide.gradient &&
33
38
  slide.gradient.length > 0
34
39
  );
35
40
  }