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.d.ts
CHANGED
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
|
|
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
|
-
},
|
|
4072
|
+
}, timerToResend);
|
|
4073
4073
|
};
|
|
4074
4074
|
React.useEffect(() => {
|
|
4075
4075
|
if (reactNative.Platform.OS === "android") {
|