@comicrelief/component-library 8.51.2 → 8.51.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Molecules/EmailSignUp/EmailSignUp.style.js +4 -4
- package/dist/components/Organisms/FooterNew/FooterNew.js +2 -4
- package/dist/components/Organisms/FooterNew/FooterNew.md +1 -0
- package/dist/components/Organisms/FooterNew/FooterNew.style.js +57 -62
- package/dist/components/Organisms/FooterNew/FooterNew.test.js +8 -0
- package/dist/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +1673 -22
- package/package.json +1 -1
- package/src/components/Molecules/EmailSignUp/EmailSignUp.style.js +16 -5
- package/src/components/Organisms/FooterNew/FooterNew.js +2 -4
- package/src/components/Organisms/FooterNew/FooterNew.md +1 -0
- package/src/components/Organisms/FooterNew/FooterNew.style.js +15 -13
- package/src/components/Organisms/FooterNew/FooterNew.test.js +12 -0
- package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +1673 -22
package/package.json
CHANGED
|
@@ -48,8 +48,8 @@ export const InputWrapper = styled.div`
|
|
|
48
48
|
width: 100%;
|
|
49
49
|
overflow: visible;
|
|
50
50
|
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
51
|
-
width:
|
|
52
|
-
|
|
51
|
+
width: 100%;
|
|
52
|
+
max-width: 364px;
|
|
53
53
|
}
|
|
54
54
|
`;
|
|
55
55
|
|
|
@@ -69,7 +69,8 @@ export const StyledEmailInput = styled(Input)`
|
|
|
69
69
|
font-family: ${theme.fontFamilies('Montserrat')};
|
|
70
70
|
background-color: ${theme.color('grey_5')};
|
|
71
71
|
border-color: transparent;
|
|
72
|
-
|
|
72
|
+
height: 44px;
|
|
73
|
+
padding: 12px 2.4rem 12px 18px;
|
|
73
74
|
transition: background-color 0.2s ease, text-indent 0.18s ease;
|
|
74
75
|
border: 1px solid ${theme.color('white')};
|
|
75
76
|
color: ${theme.color('white')};
|
|
@@ -90,19 +91,25 @@ export const ButtonWrapper = styled.div`
|
|
|
90
91
|
justify-content: center;
|
|
91
92
|
width: 100%;
|
|
92
93
|
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
93
|
-
|
|
94
|
+
width: 100%;
|
|
95
|
+
max-width: 123px;
|
|
96
|
+
flex: 0 0 auto;
|
|
94
97
|
}
|
|
95
98
|
`;
|
|
96
99
|
|
|
97
100
|
export const StyledEmailSignUpButton = styled(Button)`
|
|
98
101
|
margin: 0;
|
|
99
102
|
font-family: ${({ theme }) => theme.fontFamilies('Montserrat')};
|
|
100
|
-
|
|
103
|
+
height: 44px;
|
|
104
|
+
padding: 0 ${spacing('md')};
|
|
101
105
|
border-radius: 0.5rem;
|
|
102
106
|
overflow: hidden;
|
|
107
|
+
min-width: max-content;
|
|
108
|
+
width: 100%;
|
|
103
109
|
|
|
104
110
|
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
105
111
|
margin: 0;
|
|
112
|
+
max-width: 123px;
|
|
106
113
|
}
|
|
107
114
|
|
|
108
115
|
.emailSignUpButtonContent {
|
|
@@ -113,14 +120,18 @@ export const StyledEmailSignUpButton = styled(Button)`
|
|
|
113
120
|
align-items: center;
|
|
114
121
|
justify-content: center;
|
|
115
122
|
line-height: 1;
|
|
123
|
+
white-space: nowrap;
|
|
116
124
|
}
|
|
117
125
|
|
|
118
126
|
.emailSignUpButtonLabel {
|
|
119
127
|
display: inline-block;
|
|
128
|
+
font-size: 16px;
|
|
129
|
+
line-height: 1;
|
|
120
130
|
/* Counterbalance the reserved arrow slot so the label is centered at rest */
|
|
121
131
|
transform: translateX(13px);
|
|
122
132
|
transition: transform 0.22s ease;
|
|
123
133
|
will-change: transform;
|
|
134
|
+
white-space: nowrap;
|
|
124
135
|
}
|
|
125
136
|
|
|
126
137
|
.emailSignUpButtonArrow {
|
|
@@ -45,9 +45,7 @@ const FooterNew = ({
|
|
|
45
45
|
// Remove white space between words
|
|
46
46
|
const campaignName = campaign.replace(/\s/g, '').toLowerCase();
|
|
47
47
|
|
|
48
|
-
const
|
|
49
|
-
const defaultCopyrightText = `© ${currentYear} Comic Relief`;
|
|
50
|
-
const displayCopyrightText = copyrightText !== undefined ? copyrightText : defaultCopyrightText;
|
|
48
|
+
const displayCopyrightText = typeof copyrightText === 'string' ? copyrightText.trim() : '';
|
|
51
49
|
|
|
52
50
|
const validationSchema = yup.object({
|
|
53
51
|
email: yup
|
|
@@ -141,7 +139,7 @@ const FooterNew = ({
|
|
|
141
139
|
<SecondaryNav navItems={secondaryLinksList} {...rest} />
|
|
142
140
|
|
|
143
141
|
<FooterCopyright>
|
|
144
|
-
{displayCopyrightText && (
|
|
142
|
+
{displayCopyrightText.length > 0 && (
|
|
145
143
|
<FooterCopyrightText>
|
|
146
144
|
{displayCopyrightText}
|
|
147
145
|
</FooterCopyrightText>
|
|
@@ -11,6 +11,7 @@ import { primaryLinksList, secondaryLinksList } from './dev-data/data';
|
|
|
11
11
|
primaryLinksList={primaryLinksList}
|
|
12
12
|
secondaryLinksList={secondaryLinksList}
|
|
13
13
|
legalText={footerCopy.copy}
|
|
14
|
+
copyrightText="© 2026 Comic Relief"
|
|
14
15
|
campaign="Comic Relief"
|
|
15
16
|
showFundraisingRegulatorLogo
|
|
16
17
|
showFacebookSocialIcon
|
|
@@ -25,11 +25,16 @@ const InnerWrapper = styled.div`
|
|
|
25
25
|
display: block;
|
|
26
26
|
width: 100%;
|
|
27
27
|
height: 100%;
|
|
28
|
-
max-width:
|
|
28
|
+
max-width: 1424px; // 1200 + 64px padding on each side
|
|
29
29
|
margin: 0 auto;
|
|
30
|
-
padding: 0 ${spacing('
|
|
30
|
+
padding: 0 ${spacing('md')};
|
|
31
|
+
|
|
32
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
33
|
+
padding: 0 ${spacing('l')};
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
32
|
-
padding: 0
|
|
37
|
+
padding: 0 ${spacing('xl')};
|
|
33
38
|
}
|
|
34
39
|
`;
|
|
35
40
|
|
|
@@ -53,6 +58,7 @@ const TopSection = styled.div`
|
|
|
53
58
|
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
54
59
|
flex-direction: row;
|
|
55
60
|
justify-content: space-between;
|
|
61
|
+
column-gap: ${spacing('lg')};
|
|
56
62
|
align-items: ${({ $hasEmailSignup }) => ($hasEmailSignup ? 'flex-start' : 'center')};
|
|
57
63
|
}
|
|
58
64
|
`;
|
|
@@ -64,7 +70,8 @@ const TopSectionLeft = styled.div`
|
|
|
64
70
|
|
|
65
71
|
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
66
72
|
flex-direction: column;
|
|
67
|
-
flex:
|
|
73
|
+
flex: 1 1 auto;
|
|
74
|
+
min-width: 0;
|
|
68
75
|
}
|
|
69
76
|
`;
|
|
70
77
|
|
|
@@ -120,7 +127,7 @@ const PrimaryNavLink = styled(Link)`
|
|
|
120
127
|
color: ${({ theme }) => theme.color('white')};
|
|
121
128
|
text-decoration: none;
|
|
122
129
|
font-weight: bold;
|
|
123
|
-
font-size:
|
|
130
|
+
font-size: 16px;
|
|
124
131
|
|
|
125
132
|
&:hover,
|
|
126
133
|
&:focus {
|
|
@@ -132,6 +139,7 @@ const PrimaryNavLink = styled(Link)`
|
|
|
132
139
|
const PrimaryNavText = styled(Text)`
|
|
133
140
|
color: ${({ theme }) => theme.color('white')};
|
|
134
141
|
font-weight: bold;
|
|
142
|
+
font-size: 16px;
|
|
135
143
|
`;
|
|
136
144
|
|
|
137
145
|
const SecondaryNav = styled.nav`
|
|
@@ -168,18 +176,12 @@ const SecondaryNavLink = styled(Link)`
|
|
|
168
176
|
> span {
|
|
169
177
|
color: ${({ theme }) => theme.color('white')};
|
|
170
178
|
opacity: 0.8;
|
|
171
|
-
text-decoration:
|
|
179
|
+
text-decoration: none;
|
|
172
180
|
text-decoration-color: ${({ theme }) => theme.color('white')};
|
|
173
181
|
font-weight: normal;
|
|
174
182
|
font-size: 0.875rem;
|
|
175
183
|
}
|
|
176
184
|
|
|
177
|
-
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
178
|
-
> span {
|
|
179
|
-
text-decoration: none;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
185
|
&:hover,
|
|
184
186
|
&:focus {
|
|
185
187
|
text-decoration: underline;
|
|
@@ -200,7 +202,7 @@ const LogosContainer = styled.div`
|
|
|
200
202
|
align-items: center;
|
|
201
203
|
gap: ${spacing('l')};
|
|
202
204
|
justify-content: ${({ $mobileOnly }) => ($mobileOnly ? 'flex-start' : 'center')};
|
|
203
|
-
|
|
205
|
+
padding-bottom: ${({ $mobileOnly }) => ($mobileOnly ? spacing('l') : '0')};
|
|
204
206
|
|
|
205
207
|
/* Hide desktop containers on mobile */
|
|
206
208
|
${({ $desktopOnly }) => $desktopOnly && 'display: none;'}
|
|
@@ -22,3 +22,15 @@ it('renders correctly', () => {
|
|
|
22
22
|
|
|
23
23
|
expect(tree).toMatchSnapshot();
|
|
24
24
|
});
|
|
25
|
+
|
|
26
|
+
it('does not render copyright text when not supplied', () => {
|
|
27
|
+
const tree = renderWithTheme(
|
|
28
|
+
<FooterNew
|
|
29
|
+
primaryLinksList={testPrimaryLinksList}
|
|
30
|
+
secondaryLinksList={testSecondaryLinksList}
|
|
31
|
+
legalText={footerCopy.copy}
|
|
32
|
+
/>
|
|
33
|
+
).toJSON();
|
|
34
|
+
|
|
35
|
+
expect(tree).toMatchSnapshot();
|
|
36
|
+
});
|