@servesall/atoms 1.1.15 → 1.1.17
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/dist/bundle.cjs.js +611 -529
- package/dist/bundle.esm.js +611 -531
- package/dist/bundle.umd.js +614 -533
- package/package.json +2 -3
- package/src/Layout/Box.js +1 -1
- package/src/Layout/Center.js +7 -7
- package/src/Layout/CenterLeft.js +7 -7
- package/src/Layout/CenterRight.js +7 -7
- package/src/Layout/Layout.style.js +25 -25
- package/src/Layout/Margin.js +7 -7
- package/src/Layout/MarginBottom.js +7 -7
- package/src/Layout/MarginHorizontal.js +7 -7
- package/src/Layout/MarginLeft.js +1 -1
- package/src/Layout/MarginRight.js +1 -1
- package/src/Layout/MarginTop.js +1 -1
- package/src/Layout/MarginVertical.js +7 -7
- package/src/Layout/Padding.js +7 -7
- package/src/Layout/PaddingBottom.js +1 -1
- package/src/Layout/PaddingHorizontal.js +7 -7
- package/src/Layout/PaddingLeft.js +1 -1
- package/src/Layout/PaddingRight.js +1 -1
- package/src/Layout/PaddingTop.js +1 -1
- package/src/Layout/PaddingVertical.js +7 -7
- package/src/Layout/RoundedTopBox.js +1 -1
- package/src/Layout/Stretch.js +7 -7
- package/src/Layout/WebSmallWrapper.js +7 -8
- package/src/SplashScreen/SplashScreen.style.js +6 -0
- package/src/SplashScreen/assets/bootsplash_logo.png +0 -0
- package/src/SplashScreen/assets/bootsplash_logo@1,5x.png +0 -0
- package/src/SplashScreen/assets/bootsplash_logo@2x.png +0 -0
- package/src/SplashScreen/assets/bootsplash_logo@3x.png +0 -0
- package/src/SplashScreen/assets/bootsplash_logo@4x.png +0 -0
- package/src/SplashScreen/assets/bootsplash_manifest.json +7 -0
- package/src/SplashScreen/assets/penguinOriginal.svg +20 -0
- package/src/SplashScreen/index.js +69 -0
- package/src/Theme/definitions/colors.js +1 -0
- package/src/index.js +2 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Animated, Image, Easing, StatusBar } from "react-native";
|
|
3
|
+
import BootSplash from "react-native-bootsplash";
|
|
4
|
+
import bootsplash_logo from "./assets/bootsplash_logo.png";
|
|
5
|
+
import bootsplash_manifest from "./assets/bootsplash_manifest.json";
|
|
6
|
+
import { Container } from "./SplashScreen.style";
|
|
7
|
+
import { theme } from "../Theme/definitions";
|
|
8
|
+
|
|
9
|
+
const AnimatedBootSplash = ({ onAnimationEnd }) => {
|
|
10
|
+
const [opacity] = useState(() => new Animated.Value(0));
|
|
11
|
+
|
|
12
|
+
const { container, logo /*, brand */ } = BootSplash.useHideAnimation({
|
|
13
|
+
manifest: bootsplash_manifest,
|
|
14
|
+
logo: { uri: bootsplash_logo },
|
|
15
|
+
// darkLogo: require("../assets/bootsplash_dark_logo.png"),
|
|
16
|
+
// brand: require("../assets/bootsplash_brand.png"),
|
|
17
|
+
// darkBrand: require("../assets/bootsplash_dark_brand.png"),
|
|
18
|
+
statusBarTranslucent: true,
|
|
19
|
+
navigationBarTranslucent: false,
|
|
20
|
+
animate: () => {
|
|
21
|
+
// Perform animations and call onAnimationEnd
|
|
22
|
+
Animated.timing(opacity, {
|
|
23
|
+
useNativeDriver: true,
|
|
24
|
+
toValue: 800,
|
|
25
|
+
duration: 250,
|
|
26
|
+
easing: Easing.back(),
|
|
27
|
+
}).start(() => {
|
|
28
|
+
onAnimationEnd();
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Animated.View
|
|
35
|
+
{...container}
|
|
36
|
+
style={[
|
|
37
|
+
container.style,
|
|
38
|
+
{
|
|
39
|
+
transform: [
|
|
40
|
+
{
|
|
41
|
+
translateY: opacity,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
]}
|
|
46
|
+
>
|
|
47
|
+
<Image {...logo} />
|
|
48
|
+
{/* <Image {...brand} /> */}
|
|
49
|
+
</Animated.View>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default function SplashScreen({ children }) {
|
|
54
|
+
const [visible, setVisible] = useState(true);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Container>
|
|
58
|
+
<StatusBar backgroundColor={theme.color1} barStyle="dark-content" />
|
|
59
|
+
{visible && (
|
|
60
|
+
<AnimatedBootSplash
|
|
61
|
+
onAnimationEnd={() => {
|
|
62
|
+
setVisible(false);
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
)}
|
|
66
|
+
{!visible && children}
|
|
67
|
+
</Container>
|
|
68
|
+
);
|
|
69
|
+
}
|
package/src/index.js
CHANGED
|
@@ -52,6 +52,7 @@ import Switch from "./Switch";
|
|
|
52
52
|
import SwipeButton from "./SlideToConfirm";
|
|
53
53
|
import ErrorText from "./ErrorText";
|
|
54
54
|
import CountryList from "./CountryFlatList";
|
|
55
|
+
import SplashScreen from "./SplashScreen";
|
|
55
56
|
|
|
56
57
|
export {
|
|
57
58
|
ThemeWrapper,
|
|
@@ -109,4 +110,5 @@ export {
|
|
|
109
110
|
ErrorText,
|
|
110
111
|
AnimatedRoundedButton,
|
|
111
112
|
CountryList,
|
|
113
|
+
SplashScreen,
|
|
112
114
|
};
|