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 CHANGED
@@ -780,10 +780,7 @@ const createStyles$3 = (theme) => {
780
780
  });
781
781
  };
782
782
 
783
- const CustomLoader = ({
784
- loading,
785
- loadingText = "Loading..."
786
- }) => {
783
+ const CustomLoader = ({ loading, loadingText = "Loading..." }) => {
787
784
  const rotateAnim = React.useRef(new reactNative.Animated.Value(0)).current;
788
785
  const { theme, mode } = useTheme();
789
786
  const styles = createStyles$3(theme);
@@ -798,8 +795,12 @@ const CustomLoader = ({
798
795
  })
799
796
  ).start();
800
797
  } else {
798
+ rotateAnim.stopAnimation();
801
799
  rotateAnim.setValue(0);
802
800
  }
801
+ return () => {
802
+ rotateAnim.stopAnimation();
803
+ };
803
804
  }, [loading, rotateAnim]);
804
805
  if (!loading) return null;
805
806
  const spin = rotateAnim.interpolate({
@@ -4029,7 +4030,7 @@ const OTPInput = React__default["default"].forwardRef(
4029
4030
  resendText = "Resend OTP",
4030
4031
  mode,
4031
4032
  disabled,
4032
- maxResendCount = 4,
4033
+ maxResendCount = 3,
4033
4034
  timerToResend = 6e4
4034
4035
  }, ref) => {
4035
4036
  const [otp, setOTP] = React.useState("");