File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 66 "bracketSpacing": true,
77 "jsxBracketSameLine": false,
88 "arrowParens": "always",
9- "trailingComma": "none"
9+ "trailingComma": "none",
10+ "endOfLine": "auto"
1011}
Original file line number Diff line number Diff line change @@ -2,12 +2,19 @@ import React from 'react'
22import { useNetlifyFormContext } from './netlify-form-context'
33import GoogleRecaptcha from 'react-google-recaptcha'
44
5- export const Recaptcha = ( { siteKey = '' , invisible = false } ) => {
5+ export const Recaptcha = ( {
6+ siteKey = '' ,
7+ invisible = false ,
8+ ...passThroughProps
9+ } ) => {
610 const { recaptchaRef } = useNetlifyFormContext ( )
711
8- return invisible ? (
9- < GoogleRecaptcha sitekey = { siteKey } ref = { recaptchaRef } size = 'invisible' />
10- ) : (
11- < GoogleRecaptcha sitekey = { siteKey } ref = { recaptchaRef } />
12+ return (
13+ < GoogleRecaptcha
14+ { ...passThroughProps }
15+ sitekey = { siteKey }
16+ ref = { recaptchaRef }
17+ { ...( invisible ? { size : 'invisible' } : { } ) }
18+ />
1219 )
1320}
Original file line number Diff line number Diff line change @@ -84,10 +84,11 @@ In Netlify dashboard you have to set SITE_RECAPTCHA_KEY and SITE_RECAPTCHA_SECRE
8484
8585Available props:
8686
87- | Name | Req | Description |
88- | --------- | --- | ------------------------------------------------- |
89- | siteKey | Y | Recaptcha public site key. |
90- | invisible | N | Set whether reCAPTCHA should be invisible or not. |
87+ | Name | Req | Description |
88+ | --------- | --- | ------------------------------------------------------------------------------------------------------------------------------------------ |
89+ | siteKey | Y | Recaptcha public site key. |
90+ | invisible | N | Set whether reCAPTCHA should be invisible or not. |
91+ | * (any)* | N | Any other prop will be passed through to the [ underlying component] ( https://www.npmjs.com/package/react-google-recaptcha#component-props ) . |
9192
9293<!-- prettier-ignore -->
9394*[Req]: Required
You can’t perform that action at this time.
0 commit comments