dhre-ui-kit 0.0.233 → 0.0.234

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.mjs CHANGED
@@ -4015,6 +4015,7 @@ const OTPInput = React.forwardRef(
4015
4015
  return;
4016
4016
  }
4017
4017
  if (resendOTPCount < 3) {
4018
+ setIsResendOtpEnable(false);
4018
4019
  setResendOTPCount(resendOTPCount + 1);
4019
4020
  enableResendOtp();
4020
4021
  resendOTP?.();
@@ -4022,10 +4023,17 @@ const OTPInput = React.forwardRef(
4022
4023
  }
4023
4024
  };
4024
4025
  const enableResendOtp = () => {
4025
- if (!disabled && resendOTPCount <= 3) {
4026
- setTimeout(() => {
4027
- setIsResendOtpEnable(true);
4028
- }, 6e4);
4026
+ setTimeout(() => {
4027
+ setIsResendOtpEnable(true);
4028
+ }, 5e3);
4029
+ };
4030
+ const disableResendButton = () => {
4031
+ if (disabled === true && resendOTPCount >= 3) {
4032
+ setIsResendOtpEnable(true);
4033
+ return true;
4034
+ } else {
4035
+ setIsResendOtpEnable(false);
4036
+ return false;
4029
4037
  }
4030
4038
  };
4031
4039
  useEffect(() => {
@@ -4129,7 +4137,7 @@ const OTPInput = React.forwardRef(
4129
4137
  {
4130
4138
  onPress: onClickResendOTP,
4131
4139
  style: styles$5.resendOTPStyle,
4132
- disabled: !isResendOtpEnable || resendOTPCount >= 3
4140
+ disabled: disableResendButton() || !isResendOtpEnable
4133
4141
  },
4134
4142
  /* @__PURE__ */ React.createElement(
4135
4143
  CustomTypography,