google-react-recaptcha-v2
Version:
React component for Google reCAPTCHA
25 lines (21 loc) • 688 B
TypeScript
import * as react from 'react';
interface ReCaptchaV2Props {
badge?: "bottomright" | "bottomleft" | "inline";
hl?: string;
onError?: () => void;
onExpired?: () => void;
onSuccess?: (token: string) => void;
siteKey: string;
isDevelop?: boolean;
size?: "invisible" | "normal" | "compact";
theme?: "light" | "dark";
tabindex?: number;
multiple?: boolean;
}
interface ReCaptchaV2Ref {
execute: () => Promise<string>;
reset: () => void;
getResponse: () => string | null;
}
declare const ReCaptchaV2: react.ForwardRefExoticComponent<ReCaptchaV2Props & react.RefAttributes<ReCaptchaV2Ref>>;
export { ReCaptchaV2, type ReCaptchaV2Ref };