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 +1 -0
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +4 -4
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -3990,7 +3990,8 @@ const OTPInput = React.forwardRef(
|
|
|
3990
3990
|
resendText = "Resend OTP",
|
|
3991
3991
|
mode,
|
|
3992
3992
|
disabled,
|
|
3993
|
-
maxResendCount = 4
|
|
3993
|
+
maxResendCount = 4,
|
|
3994
|
+
timerToResend = 6e4
|
|
3994
3995
|
}, ref) => {
|
|
3995
3996
|
const [otp, setOTP] = useState("");
|
|
3996
3997
|
const [isResendOtpEnable, setIsResendOtpEnable] = useState(false);
|
|
@@ -4013,9 +4014,8 @@ const OTPInput = React.forwardRef(
|
|
|
4013
4014
|
const onClickResendOTP = () => {
|
|
4014
4015
|
if (resendOTPCount >= maxResendCount - 1) {
|
|
4015
4016
|
setErrorMessageMaxReachCount("You have exceeded the maximum number of attempts.");
|
|
4016
|
-
return;
|
|
4017
4017
|
}
|
|
4018
|
-
if (resendOTPCount
|
|
4018
|
+
if (resendOTPCount <= maxResendCount) {
|
|
4019
4019
|
setIsResendOtpEnable(false);
|
|
4020
4020
|
setResendOTPCount(resendOTPCount + 1);
|
|
4021
4021
|
enableResendOtp();
|
|
@@ -4033,7 +4033,7 @@ const OTPInput = React.forwardRef(
|
|
|
4033
4033
|
const enableResendOtp = () => {
|
|
4034
4034
|
setTimeout(() => {
|
|
4035
4035
|
setIsResendOtpEnable(true);
|
|
4036
|
-
},
|
|
4036
|
+
}, timerToResend);
|
|
4037
4037
|
};
|
|
4038
4038
|
useEffect(() => {
|
|
4039
4039
|
if (Platform.OS === "android") {
|