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.mjs
CHANGED
|
@@ -3994,7 +3994,7 @@ const OTPInput = React.forwardRef(
|
|
|
3994
3994
|
resendText = "Resend OTP",
|
|
3995
3995
|
mode,
|
|
3996
3996
|
disabled,
|
|
3997
|
-
maxResendCount =
|
|
3997
|
+
maxResendCount = 2,
|
|
3998
3998
|
timerToResend = 6e4
|
|
3999
3999
|
}, ref) => {
|
|
4000
4000
|
const [otp, setOTP] = useState("");
|
|
@@ -4016,10 +4016,10 @@ const OTPInput = React.forwardRef(
|
|
|
4016
4016
|
enableResendOtp();
|
|
4017
4017
|
}, []);
|
|
4018
4018
|
const onClickResendOTP = () => {
|
|
4019
|
-
if (resendOTPCount
|
|
4019
|
+
if (resendOTPCount > maxResendCount - 1) {
|
|
4020
4020
|
setErrorMessageMaxReachCount("You have exceeded the maximum number of attempts.");
|
|
4021
4021
|
}
|
|
4022
|
-
if (resendOTPCount
|
|
4022
|
+
if (resendOTPCount < maxResendCount) {
|
|
4023
4023
|
setIsResendOtpEnable(false);
|
|
4024
4024
|
setResendOTPCount(resendOTPCount + 1);
|
|
4025
4025
|
enableResendOtp();
|