We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dcc9dc commit 6180961Copy full SHA for 6180961
src/recaptcha.js
@@ -2,12 +2,15 @@ import React from 'react'
2
import { useNetlifyFormContext } from './netlify-form-context'
3
import GoogleRecaptcha from 'react-google-recaptcha'
4
5
-export const Recaptcha = ({ siteKey = '', invisible = false }) => {
+export const Recaptcha = ({ siteKey = '', invisible = false, ...passThroughProps }) => {
6
const { recaptchaRef } = useNetlifyFormContext()
7
8
- return invisible ? (
9
- <GoogleRecaptcha sitekey={siteKey} ref={recaptchaRef} size='invisible' />
10
- ) : (
11
- <GoogleRecaptcha sitekey={siteKey} ref={recaptchaRef} />
+ return (
+ <GoogleRecaptcha
+ {...passThroughProps}
+ sitekey={siteKey}
12
+ ref={recaptchaRef}
13
+ {...(invisible ? {size: 'invisible'} : {})}
14
+ />
15
)
16
}
0 commit comments