44 headlineMedium20 ,
55 space ,
66 textSans14 ,
7- textSans15 ,
7+ textSansBold15 ,
88} from '@guardian/source/foundations' ;
99import { SvgNewsletterFilled } from '@guardian/source/react-components' ;
1010import { palette as themePalette } from '../palette' ;
@@ -54,24 +54,44 @@ const titleStyles = css`
5454
5555const frequencyTagStyles = css `
5656 dis play: flex;
57+ flex- wrap: wrap;
5758 align- items: center;
59+ gap: ${ space [ 1 ] } px;
5860 color : ${ themePalette ( '--newsletter-card-frequency-tag' ) } ;
59- ${ textSans15 } ;
60- margin- left: -1px;
61- margin- to p: -1px;
62- margin- botto m: ${ space [ 1 ] } px;
61+ ${ textSansBold15 } ;
62+ margin- botto m: ${ space [ 2 ] } px;
63+ ` ;
64+
65+ const frequencyLabelStyles = css `
66+ white-space: nowrap;
67+ ` ;
68+
69+ const badgeStyles = css `
70+ dis play: flex;
71+ align- items: center;
72+ justify- content: center;
73+ flex- shrink: 0;
74+ width: 20px;
75+ height: 20px;
76+ bor der- radius: 50%;
77+ background- color : ${ themePalette ( '--newsletter-card-badge-background' ) } ;
6378
6479 svg {
65- fill: currentCol or ;
66- height: 20px ;
67- width: 20px ;
80+ fill: ${ themePalette ( '--newsletter-card-badge-icon' ) } ;
81+ height: 14px ;
82+ width: 14px ;
6883 }
6984` ;
7085
86+ const innerDividerStyles = css `
87+ bor der: none;
88+ bor der- to p: 1px solid ${ themePalette ( '--newsletter-card-divider' ) } ;
89+ margin: 0 0 ${ space [ 2 ] } px;
90+ ` ;
91+
7192const descriptionStyles = css `
7293 ${ textSans14 } ;
7394 line-height: 1.15;
74- margin- botto m: ${ space [ 2 ] } px;
7595 clear: both;
7696 color : ${ themePalette ( '--newsletter-card-description' ) } ;
7797` ;
@@ -92,27 +112,33 @@ const illustrationStyles = css`
92112const NewsletterSignupHeader = (
93113 props : Omit < NewsletterSignupCardProps , 'children' > ,
94114) => (
95- < div css = { headerStyles } >
96- < div css = { titleAndMetaStyles } >
97- < div css = { frequencyTagStyles } >
115+ < >
116+ < div css = { frequencyTagStyles } >
117+ < span css = { badgeStyles } >
98118 < SvgNewsletterFilled />
99- Free newsletter | { props . frequency }
119+ </ span >
120+ < span css = { frequencyLabelStyles } > Free newsletter |</ span >
121+ < span css = { frequencyLabelStyles } > { props . frequency } </ span >
122+ </ div >
123+ < hr css = { innerDividerStyles } />
124+ < div css = { headerStyles } >
125+ < div css = { titleAndMetaStyles } >
126+ < p css = { titleStyles } >
127+ Sign up to < span > { props . name } </ span >
128+ </ p >
129+ < p css = { descriptionStyles } > { props . description } </ p >
100130 </ div >
101- < p css = { titleStyles } >
102- Sign up to < span > { props . name } </ span >
103- </ p >
104- < p css = { descriptionStyles } > { props . description } </ p >
131+ { ! ! props . illustrationSquare && (
132+ < img
133+ css = { illustrationStyles }
134+ src = { props . illustrationSquare }
135+ alt = ""
136+ loading = "lazy"
137+ decoding = "async"
138+ />
139+ ) }
105140 </ div >
106- { ! ! props . illustrationSquare && (
107- < img
108- css = { illustrationStyles }
109- src = { props . illustrationSquare }
110- alt = ""
111- loading = "lazy"
112- decoding = "async"
113- />
114- ) }
115- </ div >
141+ </ >
116142) ;
117143
118144export const NewsletterSignupCard = ( {
0 commit comments