Update react-google-recaptcha types

- Added the `onErrored?: () => void;` prop, with description sourced from https://developers.google.com/recaptcha/docs/display
This commit is contained in:
Max Bo
2019-01-26 18:30:21 +11:00
committed by Max Bo
parent 203d924c9e
commit c2e5d91390
+7 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for React Google Recaptcha 0.10
// Type definitions for React Google Recaptcha 1.0
// Project: https://github.com/dozoisch/react-google-recaptcha
// Definitions by: Koala Human <https://github.com/KoalaHuman>, Tom Sturge <https://github.com/tomsturge>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -66,6 +66,12 @@ export interface ReCAPTCHAProps {
* Optional callback, called when a challenge expires and has to be redone by the user.
*/
onExpired?: () => void;
/**
* Optional callback, called when reCAPTCHA encounters an error (usually network connectivity)
* and cannot continue until connectivity is restored. If you specify a function here, you are
* responsible for informing the user that they should retry.
*/
onErrored?: () => void;
/**
* Optional set the stoken parameter, which allows the captcha to be used from different domains,
* @see reCAPTCHA secure-token