react-grecaptcha-v3
Version:
Google Recaptcha V3 for React.js based application. Keep website performance high while prioritizing security.
19 lines (18 loc) • 619 B
TypeScript
export type ReCaptchaProps = Readonly<{
siteKey: string;
useRecaptchaNet: boolean;
enterprise: boolean;
}>;
export declare const getScriptSrc: ({ enterprise, useRecaptchaNet, siteKey, }: ReCaptchaProps) => string;
export type CreatScriptProps = Readonly<{
id: string;
async: boolean;
defer: boolean;
src: string;
nonce?: string;
}>;
export type InjectScriptProps = CreatScriptProps & {
appendTo: 'head' | 'body';
};
export declare const maybeInjectScript: ({ appendTo, ...scriptProps }: InjectScriptProps) => void;
export declare const maybeRemoveScript: (scriptId: string) => void;