dhre-ui-kit 0.0.235 → 0.0.236

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.d.ts CHANGED
@@ -713,6 +713,7 @@ interface IProps$1 {
713
713
  mode?: 'light' | 'dark';
714
714
  disabled?: boolean;
715
715
  maxResendCount?: number;
716
+ timerToResend?: number;
716
717
  }
717
718
  type OTPInputHandle = {
718
719
  reset?: () => void;
package/lib/index.js CHANGED
@@ -4026,7 +4026,8 @@ const OTPInput = React__default["default"].forwardRef(
4026
4026
  resendText = "Resend OTP",
4027
4027
  mode,
4028
4028
  disabled,
4029
- maxResendCount = 4
4029
+ maxResendCount = 4,
4030
+ timerToResend = 6e4
4030
4031
  }, ref) => {
4031
4032
  const [otp, setOTP] = React.useState("");
4032
4033
  const [isResendOtpEnable, setIsResendOtpEnable] = React.useState(false);
@@ -4049,9 +4050,8 @@ const OTPInput = React__default["default"].forwardRef(
4049
4050
  const onClickResendOTP = () => {
4050
4051
  if (resendOTPCount >= maxResendCount - 1) {
4051
4052
  setErrorMessageMaxReachCount("You have exceeded the maximum number of attempts.");
4052
- return;
4053
4053
  }
4054
- if (resendOTPCount < maxResendCount) {
4054
+ if (resendOTPCount <= maxResendCount) {
4055
4055
  setIsResendOtpEnable(false);
4056
4056
  setResendOTPCount(resendOTPCount + 1);
4057
4057
  enableResendOtp();
@@ -4069,7 +4069,7 @@ const OTPInput = React__default["default"].forwardRef(
4069
4069
  const enableResendOtp = () => {
4070
4070
  setTimeout(() => {
4071
4071
  setIsResendOtpEnable(true);
4072
- }, 6e4);
4072
+ }, timerToResend);
4073
4073
  };
4074
4074
  React.useEffect(() => {
4075
4075
  if (reactNative.Platform.OS === "android") {