dhre-ui-kit 0.0.239 → 0.0.240
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 +6 -5
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +6 -5
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -744,10 +744,7 @@ const createStyles$3 = (theme) => {
|
|
|
744
744
|
});
|
|
745
745
|
};
|
|
746
746
|
|
|
747
|
-
const CustomLoader = ({
|
|
748
|
-
loading,
|
|
749
|
-
loadingText = "Loading..."
|
|
750
|
-
}) => {
|
|
747
|
+
const CustomLoader = ({ loading, loadingText = "Loading..." }) => {
|
|
751
748
|
const rotateAnim = useRef(new Animated.Value(0)).current;
|
|
752
749
|
const { theme, mode } = useTheme();
|
|
753
750
|
const styles = createStyles$3(theme);
|
|
@@ -762,8 +759,12 @@ const CustomLoader = ({
|
|
|
762
759
|
})
|
|
763
760
|
).start();
|
|
764
761
|
} else {
|
|
762
|
+
rotateAnim.stopAnimation();
|
|
765
763
|
rotateAnim.setValue(0);
|
|
766
764
|
}
|
|
765
|
+
return () => {
|
|
766
|
+
rotateAnim.stopAnimation();
|
|
767
|
+
};
|
|
767
768
|
}, [loading, rotateAnim]);
|
|
768
769
|
if (!loading) return null;
|
|
769
770
|
const spin = rotateAnim.interpolate({
|
|
@@ -3993,7 +3994,7 @@ const OTPInput = React.forwardRef(
|
|
|
3993
3994
|
resendText = "Resend OTP",
|
|
3994
3995
|
mode,
|
|
3995
3996
|
disabled,
|
|
3996
|
-
maxResendCount =
|
|
3997
|
+
maxResendCount = 3,
|
|
3997
3998
|
timerToResend = 6e4
|
|
3998
3999
|
}, ref) => {
|
|
3999
4000
|
const [otp, setOTP] = useState("");
|