dhre-ui-kit 0.0.233 → 0.0.234
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 +13 -5
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +13 -5
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4051,6 +4051,7 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4051
4051
|
return;
|
|
4052
4052
|
}
|
|
4053
4053
|
if (resendOTPCount < 3) {
|
|
4054
|
+
setIsResendOtpEnable(false);
|
|
4054
4055
|
setResendOTPCount(resendOTPCount + 1);
|
|
4055
4056
|
enableResendOtp();
|
|
4056
4057
|
resendOTP?.();
|
|
@@ -4058,10 +4059,17 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4058
4059
|
}
|
|
4059
4060
|
};
|
|
4060
4061
|
const enableResendOtp = () => {
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4062
|
+
setTimeout(() => {
|
|
4063
|
+
setIsResendOtpEnable(true);
|
|
4064
|
+
}, 5e3);
|
|
4065
|
+
};
|
|
4066
|
+
const disableResendButton = () => {
|
|
4067
|
+
if (disabled === true && resendOTPCount >= 3) {
|
|
4068
|
+
setIsResendOtpEnable(true);
|
|
4069
|
+
return true;
|
|
4070
|
+
} else {
|
|
4071
|
+
setIsResendOtpEnable(false);
|
|
4072
|
+
return false;
|
|
4065
4073
|
}
|
|
4066
4074
|
};
|
|
4067
4075
|
React.useEffect(() => {
|
|
@@ -4165,7 +4173,7 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4165
4173
|
{
|
|
4166
4174
|
onPress: onClickResendOTP,
|
|
4167
4175
|
style: styles$5.resendOTPStyle,
|
|
4168
|
-
disabled:
|
|
4176
|
+
disabled: disableResendButton() || !isResendOtpEnable
|
|
4169
4177
|
},
|
|
4170
4178
|
/* @__PURE__ */ React__default["default"].createElement(
|
|
4171
4179
|
CustomTypography,
|