diff --git a/package.json b/package.json index 556c23c..2a222d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@erickcrus/react-native-recaptcha", - "version": "0.1.9", + "version": "0.1.10", "private": false, "license": "MIT", "description": "⚛ A lightweight new invisible recaptcha lib", diff --git a/src/Recaptcha.tsx b/src/Recaptcha.tsx index 68ac270..e433be8 100644 --- a/src/Recaptcha.tsx +++ b/src/Recaptcha.tsx @@ -160,6 +160,11 @@ export type RecaptchaProps = { * Ativar debug */ debug?: boolean; + + /** + * Timeout para expirar o recaptcha + */ + timeout?: number; }; const Recaptcha = forwardRef((props, $ref) => { @@ -181,7 +186,8 @@ const Recaptcha = forwardRef((props, $ref) => { hideBadge, hideLoader, enterprise, - debug + debug, + timeout: _timeout, } = props; const $webView = useRef(null); @@ -270,7 +276,7 @@ const Recaptcha = forwardRef((props, $ref) => { true; `); setLoading(false); - }, 30000); + }, _timeout ?? 30000); // run recaptcha containerOpacity.value = 1;