dhre-ui-kit 0.0.237 → 0.0.238
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/lib/index.js +13 -9
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +13 -9
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -787,17 +787,21 @@ const CustomLoader = ({ loading, loadingText = "Loading..." }) => {
|
|
|
787
787
|
React.useEffect(() => {
|
|
788
788
|
if (loading) {
|
|
789
789
|
reactNative.Animated.loop(
|
|
790
|
-
reactNative.Animated.
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
})
|
|
797
|
-
])
|
|
790
|
+
reactNative.Animated.timing(rotateAnim, {
|
|
791
|
+
toValue: 1,
|
|
792
|
+
duration: 1500,
|
|
793
|
+
easing: reactNative.Easing.linear,
|
|
794
|
+
useNativeDriver: true
|
|
795
|
+
})
|
|
798
796
|
).start();
|
|
797
|
+
} else {
|
|
798
|
+
rotateAnim.stopAnimation();
|
|
799
|
+
rotateAnim.setValue(0);
|
|
799
800
|
}
|
|
800
|
-
|
|
801
|
+
return () => {
|
|
802
|
+
rotateAnim.stopAnimation();
|
|
803
|
+
};
|
|
804
|
+
}, [loading, rotateAnim]);
|
|
801
805
|
if (!loading) return null;
|
|
802
806
|
const spin = rotateAnim.interpolate({
|
|
803
807
|
inputRange: [0, 1],
|