@umituz/react-native-onboarding 3.6.25 → 3.6.26
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.
|
|
3
|
+
"version": "3.6.26",
|
|
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",
|
|
@@ -127,7 +127,7 @@ export interface OnboardingSlide {
|
|
|
127
127
|
backgroundVideo?: any;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* Opacity of the overlay
|
|
130
|
+
* Opacity of the overlay color on top of background media
|
|
131
131
|
* Range: 0.0 to 1.0 (Default: 0.5)
|
|
132
132
|
*/
|
|
133
133
|
overlayOpacity?: number;
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React Native Onboarding - Public API
|
|
3
3
|
*
|
|
4
|
-
* Generic onboarding flow for React Native apps with
|
|
4
|
+
* Generic onboarding flow for React Native apps with custom backgrounds,
|
|
5
5
|
* animations, and customizable slides. Follows SOLID, DRY, KISS principles.
|
|
6
6
|
*
|
|
7
7
|
* Architecture:
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* title: 'Welcome',
|
|
20
20
|
* description: 'Welcome to the app',
|
|
21
21
|
* icon: '🎉',
|
|
22
|
-
*
|
|
22
|
+
* backgroundColor: '#3B82F6',
|
|
23
23
|
* },
|
|
24
24
|
* ]}
|
|
25
25
|
* onComplete={() => console.log('Completed')}
|
|
@@ -39,9 +39,9 @@ describe('useOnboardingContainerStyle', () => {
|
|
|
39
39
|
} as any);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
it('should return container style with
|
|
42
|
+
it('should return container style with custom background disabled', () => {
|
|
43
43
|
const { result } = renderHook(() =>
|
|
44
|
-
useOnboardingContainerStyle({
|
|
44
|
+
useOnboardingContainerStyle({ useCustomBackground: false })
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
expect(result.current.containerStyle).toEqual([
|
|
@@ -52,9 +52,9 @@ describe('useOnboardingContainerStyle', () => {
|
|
|
52
52
|
]);
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
it('should return container style with
|
|
55
|
+
it('should return container style with custom background enabled', () => {
|
|
56
56
|
const { result } = renderHook(() =>
|
|
57
|
-
useOnboardingContainerStyle({
|
|
57
|
+
useOnboardingContainerStyle({ useCustomBackground: true })
|
|
58
58
|
);
|
|
59
59
|
|
|
60
60
|
expect(result.current.containerStyle).toEqual([
|
|
@@ -74,7 +74,7 @@ describe('useOnboardingContainerStyle', () => {
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
const { result } = renderHook(() =>
|
|
77
|
-
useOnboardingContainerStyle({
|
|
77
|
+
useOnboardingContainerStyle({ useCustomBackground: false })
|
|
78
78
|
);
|
|
79
79
|
|
|
80
80
|
expect(result.current.containerStyle[0].paddingTop).toBe(50);
|
|
@@ -88,7 +88,7 @@ describe('useOnboardingContainerStyle', () => {
|
|
|
88
88
|
} as any);
|
|
89
89
|
|
|
90
90
|
const { result } = renderHook(() =>
|
|
91
|
-
useOnboardingContainerStyle({
|
|
91
|
+
useOnboardingContainerStyle({ useCustomBackground: false })
|
|
92
92
|
);
|
|
93
93
|
|
|
94
94
|
expect(result.current.containerStyle[0].backgroundColor).toBe('#f0f0f0');
|