@@ -177,6 +177,12 @@ const DesignableBanner: ReactComponent<BannerRenderProps> = ({
177177 tracking . abTestVariant . includes ( 'COLLAPSABLE_V1' ) ||
178178 tracking . abTestVariant . includes ( 'COLLAPSABLE_V2_MAYBE_LATER' ) ;
179179
180+ const contextClassName = tracking . abTestVariant . includes (
181+ 'COLLAPSABLE_V2_MAYBE_LATER' ,
182+ )
183+ ? 'maybe-later'
184+ : '' ;
185+
180186 const [ isCollapsed , setIsCollapsed ] = useState < boolean > ( false ) ;
181187
182188 const handleSetIsCollapsed = ( collapsed : boolean ) => {
@@ -322,6 +328,7 @@ const DesignableBanner: ReactComponent<BannerRenderProps> = ({
322328 iosAppBannerPresent ,
323329 templateSettings . containerSettings . textColor ,
324330 ) }
331+ className = { contextClassName }
325332 >
326333 < div
327334 css = {
@@ -425,36 +432,16 @@ const DesignableBanner: ReactComponent<BannerRenderProps> = ({
425432 secondaryCtaSettings = {
426433 templateSettings . secondaryCtaSettings
427434 }
435+ onCloseClick = {
436+ isMaybeLaterVariant &&
437+ isCollapsed &&
438+ typeof onCloseClick === 'function'
439+ ? onCloseClick
440+ : undefined
441+ }
428442 />
429443 </ div >
430444 </ div >
431- { isMaybeLaterVariant &&
432- isCollapsed &&
433- typeof onCloseClick === 'function' && (
434- < div
435- css = { styles . maybeLaterContainer (
436- cardsImageOrSpaceTemplateString ,
437- ) }
438- >
439- < LinkButton
440- onClick = { onCloseClick }
441- size = "small"
442- priority = "tertiary"
443- cssOverrides = { [
444- buttonStyles (
445- templateSettings . secondaryCtaSettings ,
446- ) ,
447- styles . maybeLaterButton ,
448- ] }
449- theme = { buttonThemes (
450- templateSettings . secondaryCtaSettings ,
451- 'tertiary' ,
452- ) }
453- >
454- Maybe later
455- </ LinkButton >
456- </ div >
457- ) }
458445 </ >
459446 ) }
460447
@@ -547,23 +534,26 @@ const DesignableBanner: ReactComponent<BannerRenderProps> = ({
547534 { isMaybeLaterVariant &&
548535 isCollapsed &&
549536 typeof onCloseClick === 'function' && (
550- < LinkButton
551- onClick = { onCloseClick }
552- size = "small"
553- priority = "tertiary"
554- cssOverrides = { [
555- buttonStyles (
556- templateSettings . secondaryCtaSettings ,
557- ) ,
558- styles . maybeLaterButton ,
559- ] }
560- theme = { buttonThemes (
561- templateSettings . secondaryCtaSettings ,
562- 'tertiary' ,
563- ) }
537+ < div
538+ css = { styles . maybeLaterButtonSizing }
564539 >
565- Maybe later
566- </ LinkButton >
540+ < LinkButton
541+ onClick = { onCloseClick }
542+ priority = "tertiary"
543+ cssOverrides = { [
544+ buttonStyles (
545+ templateSettings . secondaryCtaSettings ,
546+ ) ,
547+ styles . maybeLaterButton ,
548+ ] }
549+ theme = { buttonThemes (
550+ templateSettings . secondaryCtaSettings ,
551+ 'tertiary' ,
552+ ) }
553+ >
554+ Maybe later
555+ </ LinkButton >
556+ </ div >
567557 ) }
568558 </ div >
569559 </ div >
@@ -626,7 +616,7 @@ const styles = {
626616 );
627617 grid-template-rows : auto auto auto;
628618 grid-template-areas :
629- '. copy-container close-button . '
619+ '. copy-container close-button close-button '
630620 '. ${ cardsImageOrSpaceTemplateString } ${ cardsImageOrSpaceTemplateString } .'
631621 '. cta-container cta-container .' ;
632622 }
@@ -782,6 +772,10 @@ const styles = {
782772 ${ from . desktop } {
783773 margin-top : ${ space [ 5 ] } px;
784774 }
775+
776+ .maybe-later & {
777+ flex-direction : row-reverse;
778+ }
785779 ` ,
786780 headerContainer : ( background : string , bannerHasImage : boolean ) => css `
787781 align-self : stretch;
@@ -906,6 +900,7 @@ const styles = {
906900 margin- left: 0px;
907901 flex- direction: row;
908902 flex- wrap: nowrap;
903+ justify- content: start;
909904 }
910905 ` ,
911906 bodyCopyOverrides : css `
@@ -987,6 +982,10 @@ const styles = {
987982 gap : ${ space [ 4 ] } px;
988983 margin-top : ${ space [ 3 ] } px;
989984
985+ .maybe-later & {
986+ flex-direction : row;
987+ }
988+
990989 ${ until . phablet } {
991990 width : 100vw ;
992991 position : sticky;
@@ -1018,7 +1017,7 @@ const styles = {
10181017 ${ from . desktop } {
10191018 flex-direction : row;
10201019 margin-bottom : ${ space [ 6 ] } px;
1021- gap : 0 ;
1020+ gap : ${ space [ 2 ] } px ;
10221021 margin-top : ${ isCollapsed ? `${ space [ 6 ] } px` : `${ space [ 3 ] } px` } ;
10231022 margin-right : 0 ;
10241023 margin-left : 0 ;
@@ -1042,18 +1041,14 @@ const styles = {
10421041 align-self : end;
10431042 margin-bottom : ${ space [ 2 ] } px;
10441043 ` ,
1045- maybeLaterButton : css `
1046- width : 92px ;
1047-
1044+ maybeLaterButtonSizing : css `
1045+ width : 142px ;
10481046 ${ from . desktop } {
10491047 width : 118px ;
10501048 }
1051-
1052- /* ensure it doesn't adopt the full-width rule */
1053- > a ,
1054- & {
1055- width : inherit;
1056- }
1049+ ` ,
1050+ maybeLaterButton : css `
1051+ width : 100% ;
10571052 ` ,
10581053 articleCountContainer : css `
10591054 margin-bottom : ${ space [ 3 ] } px;
0 commit comments