File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,15 @@ 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 = ( { siteKey = '' , invisible = false , ... passThroughProps } ) => {
66 const { recaptchaRef } = useNetlifyFormContext ( )
77
8- return invisible ? (
9- < GoogleRecaptcha sitekey = { siteKey } ref = { recaptchaRef } size = 'invisible' />
10- ) : (
11- < GoogleRecaptcha sitekey = { siteKey } ref = { recaptchaRef } />
8+ return (
9+ < GoogleRecaptcha
10+ { ...passThroughProps }
11+ sitekey = { siteKey }
12+ ref = { recaptchaRef }
13+ { ...( invisible ? { size : 'invisible' } : { } ) }
14+ />
1215 )
1316}
You can’t perform that action at this time.
0 commit comments