@umituz/react-native-splash 1.6.3 → 1.6.4
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-splash",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Generic splash screen for React Native apps with animations, gradients, and customizable branding. SOLID, DRY, KISS principles applied.",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -66,13 +66,16 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
|
|
|
66
66
|
? undefined
|
|
67
67
|
: backgroundColor || tokens.colors.primary;
|
|
68
68
|
|
|
69
|
-
const finalGradientColors: string[] = gradientColors
|
|
70
|
-
? [...gradientColors]
|
|
71
|
-
: [finalBackgroundColor!];
|
|
72
|
-
|
|
73
69
|
// Use LinearGradient only if gradientColors provided (length > 1)
|
|
74
70
|
const hasGradient = gradientColors && gradientColors.length > 1;
|
|
75
71
|
|
|
72
|
+
// For LinearGradient, ensure at least 2 colors (tuple type requirement)
|
|
73
|
+
const finalGradientColors: [string, string, ...string[]] = hasGradient
|
|
74
|
+
? (gradientColors.length >= 2
|
|
75
|
+
? (gradientColors as [string, string, ...string[]])
|
|
76
|
+
: [gradientColors[0], gradientColors[0] || finalBackgroundColor!])
|
|
77
|
+
: [finalBackgroundColor!, finalBackgroundColor!];
|
|
78
|
+
|
|
76
79
|
const content = (
|
|
77
80
|
<>
|
|
78
81
|
<SplashDecorations />
|