@@ -37,7 +37,10 @@ export interface FormProps {
3737const CARD_CONTAINER_WIDTH = 240 ;
3838const CARD_CONTAINER_PADDING = 10 ;
3939
40- const formFrameStyle = css `
40+ const formFrameStyle = ( visibleRecaptcha : boolean ) => css `
41+ background-color : ${ visibleRecaptcha
42+ ? palette . neutral [ 100 ]
43+ : 'transparent' } ;
4144 border : ${ palette . brand [ 400 ] } 2px dashed;
4245 border-radius : 12px ;
4346 padding : ${ space [ 2 ] } px;
@@ -53,17 +56,17 @@ const formFrameStyle = css`
5356 }
5457` ;
5558
56- const formFieldsStyle = css `
59+ const formFieldsStyle = ( visibleRecaptcha : boolean ) => css `
5760 display : flex;
5861 flex-direction : column;
5962 align-items : stretch;
6063 padding-bottom : ${ space [ 1 ] } px;
6164
6265 ${ from . desktop } {
6366 flex-basis : ${ 2 * CARD_CONTAINER_WIDTH - CARD_CONTAINER_PADDING * 2 } px;
64- flex-direction : row;
67+ flex-direction : ${ visibleRecaptcha ? 'column' : ' row' } ;
6568 flex-shrink : 0 ;
66- align-items : last baseline;
69+ align-items : ${ visibleRecaptcha ? 'stretch' : ' last baseline' } ;
6770 }
6871` ;
6972
@@ -85,13 +88,14 @@ const formAsideStyle = (hideOnMobile: boolean) => css`
8588 }
8689` ;
8790
88- const signUpButtonStyle = css `
91+ const signUpButtonStyle = ( visibleRecaptcha : boolean ) => css `
8992 justify-content : center;
9093 background-color : ${ palette . neutral [ 0 ] } ;
9194 border-color : ${ palette . neutral [ 0 ] } ;
9295
9396 ${ from . desktop } {
94- flex-basis : 110px ;
97+ margin-right : ${ visibleRecaptcha ? space [ 2 ] : 0 } px;
98+ flex-basis : ${ visibleRecaptcha ? 'unset' : '110px' } ;
9599 }
96100
97101 & : hover {
@@ -139,7 +143,7 @@ export const ManyNewslettersForm = ({
139143 < form
140144 aria-label = "sign-up confirmation form"
141145 aria-live = "polite"
142- css = { formFrameStyle }
146+ css = { formFrameStyle ( visibleRecaptcha ) }
143147 onSubmit = { ( submitEvent ) => {
144148 submitEvent . preventDefault ( ) ;
145149 } }
@@ -159,7 +163,7 @@ export const ManyNewslettersForm = ({
159163 </ InlineSkipToWrapper >
160164 </ aside >
161165
162- < div css = { formFieldsStyle } >
166+ < div css = { formFieldsStyle ( visibleRecaptcha ) } >
163167 { status !== 'Success' ? (
164168 < >
165169 < ManyNewslettersFormFields
@@ -181,7 +185,7 @@ export const ManyNewslettersForm = ({
181185 onClick = { ( ) => {
182186 void handleSubmitButton ( ) ;
183187 } }
184- cssOverrides = { signUpButtonStyle }
188+ cssOverrides = { signUpButtonStyle ( visibleRecaptcha ) }
185189 >
186190 Sign up
187191 </ Button >
0 commit comments