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.mjs
CHANGED
|
@@ -751,17 +751,21 @@ const CustomLoader = ({ loading, loadingText = "Loading..." }) => {
|
|
|
751
751
|
useEffect(() => {
|
|
752
752
|
if (loading) {
|
|
753
753
|
Animated.loop(
|
|
754
|
-
Animated.
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
})
|
|
761
|
-
])
|
|
754
|
+
Animated.timing(rotateAnim, {
|
|
755
|
+
toValue: 1,
|
|
756
|
+
duration: 1500,
|
|
757
|
+
easing: Easing.linear,
|
|
758
|
+
useNativeDriver: true
|
|
759
|
+
})
|
|
762
760
|
).start();
|
|
761
|
+
} else {
|
|
762
|
+
rotateAnim.stopAnimation();
|
|
763
|
+
rotateAnim.setValue(0);
|
|
763
764
|
}
|
|
764
|
-
|
|
765
|
+
return () => {
|
|
766
|
+
rotateAnim.stopAnimation();
|
|
767
|
+
};
|
|
768
|
+
}, [loading, rotateAnim]);
|
|
765
769
|
if (!loading) return null;
|
|
766
770
|
const spin = rotateAnim.interpolate({
|
|
767
771
|
inputRange: [0, 1],
|