DefinitelyTyped/types/react-recaptcha-v3/index.d.ts
ivansiach0 f221ea35e3
Updated types for ReCaptcha and added loadReCaptcha function (#42168)
* Update types and add default class export

* Add Export to modules and update import in test file
2020-02-10 09:43:31 -08:00

27 lines
830 B
TypeScript

// Type definitions for react-recaptcha-v3 1.1
// Project: https://github.com/codeep/react-recaptcha-v3
// Definitions by: Alessandro Rabitti <https://github.com/silversonicaxel>
// Ivan Siacho <https://github.com/ivansiach0>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Component } from "react";
export namespace ReCaptcha {
interface ReCaptchaProps {
elementID?: string;
sitekey: string;
action: string;
verifyCallback?(response: string): void;
verifyCallbackName?: string;
}
}
export class ReCaptcha extends Component<ReCaptcha.ReCaptchaProps> {
static propTypes: any;
static defaultProps: ReCaptcha.ReCaptchaProps;
execute(): void;
}
export function loadReCaptcha(siteKey: string): void;