File tree 3 files changed +19
-10
lines changed
3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 6
6
"bracketSpacing": true,
7
7
"jsxBracketSameLine": false,
8
8
"arrowParens": "always",
9
- "trailingComma": "none"
9
+ "trailingComma": "none",
10
+ "endOfLine": "auto"
10
11
}
Original file line number Diff line number Diff line change @@ -2,12 +2,19 @@ import React from 'react'
2
2
import { useNetlifyFormContext } from './netlify-form-context'
3
3
import GoogleRecaptcha from 'react-google-recaptcha'
4
4
5
- export const Recaptcha = ( { siteKey = '' , invisible = false } ) => {
5
+ export const Recaptcha = ( {
6
+ siteKey = '' ,
7
+ invisible = false ,
8
+ ...passThroughProps
9
+ } ) => {
6
10
const { recaptchaRef } = useNetlifyFormContext ( )
7
11
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
+ />
12
19
)
13
20
}
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
84
84
85
85
Available props:
86
86
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 ) . |
91
92
92
93
<!-- prettier-ignore -->
93
94
*[Req]: Required
You can’t perform that action at this time.
0 commit comments