UNPKG

react-grecaptcha-v3

Version:

Google Recaptcha V3 for React.js based application. Keep website performance high while prioritizing security.

29 lines (26 loc) 891 B
import * as react from 'react'; import { FunctionComponent, ReactNode, RefObject } from 'react'; import { ExecuteRecaptcha } from './useExecuteReCaptcha.js'; interface ContextType { executeRecaptcha: ExecuteRecaptcha; injectScript: RefObject<null | (() => void)>; } declare const Context: react.Context<ContextType | null>; interface ScriptProps { nonce?: string; defer?: boolean; async?: boolean; appendTo?: 'head' | 'body'; id?: string; } declare const defaultScriptId = "rusted_labs_react_recaptcha_v3"; type Props = Readonly<{ siteKey: string | null; children: ReactNode; useRecaptchaNet?: boolean; enterprise?: boolean; scriptProps?: ScriptProps; injectionDelay?: number; }>; declare const ReCaptchaProvider: FunctionComponent<Props>; export { Context, type Props, type ScriptProps, ReCaptchaProvider as default, defaultScriptId };