@towsila/expo-ui-library 1.0.10 → 1.0.12
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
|
@@ -23,7 +23,8 @@ interface SplashScreenProps {
|
|
|
23
23
|
onFinish: () => void; // called when animation ends, app decides where to go
|
|
24
24
|
duration?: number; // total animation duration before onFinish, default 2800
|
|
25
25
|
hookStartX?: number; // hook entry X offset, default -80
|
|
26
|
-
hookStartY?: number;
|
|
26
|
+
hookStartY?: number;
|
|
27
|
+
loading?:boolean; // hook entry Y offset, default -180
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export default function AnimatedSplashScreen({
|
|
@@ -35,6 +36,7 @@ export default function AnimatedSplashScreen({
|
|
|
35
36
|
duration = 2800,
|
|
36
37
|
hookStartX = -80,
|
|
37
38
|
hookStartY = -180,
|
|
39
|
+
loading
|
|
38
40
|
}: SplashScreenProps) {
|
|
39
41
|
const { colors } = useAppTheme();
|
|
40
42
|
|
|
@@ -82,12 +84,13 @@ export default function AnimatedSplashScreen({
|
|
|
82
84
|
duration: 400,
|
|
83
85
|
easing: Easing.out(Easing.quad),
|
|
84
86
|
}));
|
|
85
|
-
|
|
87
|
+
if(!loading){
|
|
86
88
|
const timeout = setTimeout(() => {
|
|
87
89
|
onFinish();
|
|
88
90
|
}, duration);
|
|
89
91
|
|
|
90
92
|
return () => clearTimeout(timeout);
|
|
93
|
+
}
|
|
91
94
|
}, []);
|
|
92
95
|
|
|
93
96
|
const hookStyle = useAnimatedStyle(() => ({
|
|
@@ -68,7 +68,8 @@ export default function AsideBar({logo, menu, onLogout, logoutLabel, onNavigate,
|
|
|
68
68
|
height: "100%",
|
|
69
69
|
width: SIDEBAR_WIDTH,
|
|
70
70
|
backgroundColor: colors.background.main,
|
|
71
|
-
|
|
71
|
+
paddingHorizontal: 20,
|
|
72
|
+
paddingVertical:50,
|
|
72
73
|
transform: [{ translateX: slideAnim }],
|
|
73
74
|
}}>
|
|
74
75
|
{/* top container */}
|