mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Update index.d.ts * Update react-google-recaptcha-tests.tsx * Update index.d.ts * Update index.d.ts * Update react-google-recaptcha-tests.tsx * add grecaptcha prop * ...
30 lines
741 B
TypeScript
30 lines
741 B
TypeScript
import * as React from 'react';
|
|
import ReCAPTCHA, { ReCAPTCHA as ReCAPTCHA2 } from 'react-google-recaptcha';
|
|
|
|
const basicRecapchta = <ReCAPTCHA sitekey="xxx" onChange={a => a}/>;
|
|
const invisibleRecaptcha: React.SFC = () => {
|
|
const recaptchaRef = React.createRef<ReCAPTCHA>();
|
|
|
|
return (
|
|
<ReCAPTCHA
|
|
ref={recaptchaRef}
|
|
sitekey="xxx"
|
|
size="invisible"
|
|
/>
|
|
);
|
|
};
|
|
|
|
const basicRecapchta2 = <ReCAPTCHA2 sitekey="xxx" onChange={a => a}/>;
|
|
const invisibleRecaptcha2: React.SFC = () => {
|
|
const recaptchaRef = React.createRef<ReCAPTCHA2>();
|
|
|
|
return (
|
|
<ReCAPTCHA2
|
|
ref={recaptchaRef}
|
|
sitekey="xxx"
|
|
size="invisible"
|
|
grecaptcha={{}}
|
|
/>
|
|
);
|
|
};
|