dhre-ui-kit 0.0.240 → 0.0.242
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 +3 -3
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +3 -3
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4030,7 +4030,7 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4030
4030
|
resendText = "Resend OTP",
|
|
4031
4031
|
mode,
|
|
4032
4032
|
disabled,
|
|
4033
|
-
maxResendCount =
|
|
4033
|
+
maxResendCount = 2,
|
|
4034
4034
|
timerToResend = 6e4
|
|
4035
4035
|
}, ref) => {
|
|
4036
4036
|
const [otp, setOTP] = React.useState("");
|
|
@@ -4052,10 +4052,10 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4052
4052
|
enableResendOtp();
|
|
4053
4053
|
}, []);
|
|
4054
4054
|
const onClickResendOTP = () => {
|
|
4055
|
-
if (resendOTPCount
|
|
4055
|
+
if (resendOTPCount > maxResendCount - 1) {
|
|
4056
4056
|
setErrorMessageMaxReachCount("You have exceeded the maximum number of attempts.");
|
|
4057
4057
|
}
|
|
4058
|
-
if (resendOTPCount
|
|
4058
|
+
if (resendOTPCount < maxResendCount) {
|
|
4059
4059
|
setIsResendOtpEnable(false);
|
|
4060
4060
|
setResendOTPCount(resendOTPCount + 1);
|
|
4061
4061
|
enableResendOtp();
|