@comicrelief/component-library 8.48.2 → 8.49.1
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/Atoms/Button/Button.js +15 -42
- package/dist/components/Atoms/Button/Button.md +91 -1
- package/dist/components/Atoms/Button/Button.style.js +47 -0
- package/dist/components/Atoms/Button/Button.test.js +40 -12
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -1
- package/dist/components/Atoms/Link/Link.js +8 -5
- package/dist/components/Atoms/Link/Link.md +81 -78
- package/dist/components/Atoms/Link/Link.style.js +22 -18
- package/dist/components/Atoms/Link/Link.test.js +20 -19
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +0 -1
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +0 -2
- package/dist/components/Molecules/CardDs/CardDs.md +3 -3
- package/dist/components/Molecules/CardDs/CardDs.test.js +1 -1
- package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +43 -41
- package/dist/components/Molecules/Countdown/Countdown.js +4 -8
- package/dist/components/Molecules/Descriptor/Descriptor.js +1 -2
- package/dist/components/Molecules/Descriptor/Descriptor.test.js +0 -2
- package/dist/components/Molecules/InfoBanner/InfoBanner.js +6 -12
- package/dist/components/Molecules/InfoBanner/__snapshots__/InfoBanner.test.js.snap +0 -1
- package/dist/components/Molecules/Lookup/Lookup.js +9 -16
- package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +42 -40
- package/dist/components/Molecules/SearchResult/SearchResult.js +2 -4
- package/dist/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +0 -8
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +42 -40
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +1 -1
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +20 -20
- package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +21 -20
- package/dist/components/Organisms/Donate/Donate.js +1 -2
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +0 -4
- package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +2 -3
- package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +41 -18
- package/dist/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +39 -12
- package/dist/components/Organisms/Header2025/Header2025.style.js +1 -1
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +1 -1
- package/dist/components/Organisms/ImpactSlider/ImpactSlider.js +0 -1
- package/dist/components/Organisms/ImpactSlider/_ImpactMoneybuys.js +0 -1
- package/dist/components/Organisms/WYMDCarousel/WYMDCarousel.js +0 -2
- package/dist/components/Organisms/WYMDCarousel/__snapshots__/WYMDCarousel.test.js.snap +0 -1
- package/dist/theme/crTheme/buttonColors.js +84 -72
- package/dist/theme/crTheme/buttonTypes.js +12 -0
- package/dist/theme/crTheme/colors.js +13 -1
- package/dist/theme/crTheme/fontConfig.js +3 -4
- package/dist/theme/crTheme/theme.js +2 -0
- package/package.json +1 -1
- package/playwright/components/organisms/emailSignUpForm.spec.js +1 -1
- package/src/components/Atoms/Button/Button.js +18 -36
- package/src/components/Atoms/Button/Button.md +91 -1
- package/src/components/Atoms/Button/Button.style.js +37 -0
- package/src/components/Atoms/Button/Button.test.js +44 -16
- package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -1
- package/src/components/Atoms/Link/Link.js +15 -5
- package/src/components/Atoms/Link/Link.md +81 -78
- package/src/components/Atoms/Link/Link.style.js +32 -27
- package/src/components/Atoms/Link/Link.test.js +20 -19
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.js +0 -1
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +0 -2
- package/src/components/Molecules/CardDs/CardDs.md +3 -3
- package/src/components/Molecules/CardDs/CardDs.test.js +1 -1
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +43 -41
- package/src/components/Molecules/Countdown/Countdown.js +4 -4
- package/src/components/Molecules/Descriptor/Descriptor.js +0 -2
- package/src/components/Molecules/Descriptor/Descriptor.test.js +0 -2
- package/src/components/Molecules/InfoBanner/InfoBanner.js +6 -6
- package/src/components/Molecules/InfoBanner/__snapshots__/InfoBanner.test.js.snap +0 -1
- package/src/components/Molecules/Lookup/Lookup.js +4 -15
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +42 -40
- package/src/components/Molecules/SearchResult/SearchResult.js +2 -2
- package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +0 -8
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +42 -40
- package/src/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +0 -1
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +20 -20
- package/src/components/Organisms/CookieBanner/CookieBanner.test.js +21 -20
- package/src/components/Organisms/Donate/Donate.js +1 -1
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +0 -4
- package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +2 -2
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +41 -18
- package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +39 -12
- package/src/components/Organisms/Header2025/Header2025.style.js +2 -1
- package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +1 -1
- package/src/components/Organisms/ImpactSlider/ImpactSlider.js +1 -1
- package/src/components/Organisms/ImpactSlider/_ImpactMoneybuys.js +1 -1
- package/src/components/Organisms/WYMDCarousel/WYMDCarousel.js +2 -2
- package/src/components/Organisms/WYMDCarousel/__snapshots__/WYMDCarousel.test.js.snap +0 -1
- package/src/theme/crTheme/buttonColors.js +116 -76
- package/src/theme/crTheme/buttonTypes.js +7 -0
- package/src/theme/crTheme/colors.js +14 -1
- package/src/theme/crTheme/fontConfig.js +3 -4
- package/src/theme/crTheme/theme.js +3 -0
|
@@ -6,35 +6,39 @@ import fontHelper from '../../../theme/crTheme/fontHelper';
|
|
|
6
6
|
const buttonStyle = () => css`
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
position: relative;
|
|
9
|
-
padding: 0.5rem 1.25rem;
|
|
10
9
|
text-decoration: none;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
transition: all 0.3s;
|
|
14
|
-
height: 3.125rem;
|
|
10
|
+
transition: all 0.2s;
|
|
11
|
+
height: 2.5rem;
|
|
15
12
|
width: 100%;
|
|
16
13
|
justify-content: center;
|
|
17
14
|
align-items: center;
|
|
15
|
+
border: none;
|
|
18
16
|
cursor: pointer;
|
|
17
|
+
padding: 0.6rem 1rem;
|
|
18
|
+
border-radius: 0.5rem;
|
|
19
19
|
|
|
20
|
-
${({ theme }) =>
|
|
21
|
-
${fontHelper(theme, 'button')}
|
|
22
|
-
`}
|
|
20
|
+
${({ color, theme, buttonType }) => (theme.buttonColors(color, buttonType))};
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
${({ color, theme }) => (color ? theme.buttonColors(color) : theme.buttonColors('red'))};
|
|
22
|
+
${({ theme }) => css` ${fontHelper(theme, 'button')}`}
|
|
27
23
|
|
|
28
24
|
// Override with mobile-specific colours where available:
|
|
29
|
-
${({ mobileColour, theme }) => (mobileColour ? theme.buttonColors(mobileColour) : null)};
|
|
25
|
+
${({ mobileColour, theme, buttonType }) => (mobileColour ? theme.buttonColors(mobileColour, buttonType) : null)};
|
|
30
26
|
|
|
31
27
|
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
32
28
|
width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
// Reinstate general styles for 'desktop':
|
|
36
31
|
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
37
|
-
|
|
32
|
+
// I don't *believe* this needs to be reinstated, but leaving in
|
|
33
|
+
// place for now, just to avoid breaking anything downstream...
|
|
34
|
+
width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};
|
|
35
|
+
|
|
36
|
+
// Reinstate standard colours for desktop where appropriate:
|
|
37
|
+
${({
|
|
38
|
+
mobileColour, theme, buttonType, color
|
|
39
|
+
}) => (
|
|
40
|
+
mobileColour && theme.buttonColors(color, buttonType)
|
|
41
|
+
)};
|
|
38
42
|
}
|
|
39
43
|
`;
|
|
40
44
|
|
|
@@ -51,29 +55,30 @@ export const IconWrapper = styled.span`
|
|
|
51
55
|
margin-left: ${spacing('md')};
|
|
52
56
|
align-self: center;
|
|
53
57
|
right: ${spacing('m')};
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
|
|
59
|
+
${({ type }) => type === 'standard' && css`
|
|
60
|
+
position: absolute;
|
|
61
|
+
right: -2rem;
|
|
62
|
+
top: 0;
|
|
63
|
+
bottom: 0;
|
|
64
|
+
`};
|
|
65
|
+
|
|
66
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
67
|
+
width: auto;
|
|
68
|
+
right: auto;
|
|
69
|
+
position: relative;
|
|
70
|
+
${({ type }) => type === 'standard' && css`
|
|
56
71
|
position: absolute;
|
|
57
72
|
right: -2rem;
|
|
58
73
|
top: 0;
|
|
59
74
|
bottom: 0;
|
|
60
75
|
`};
|
|
61
|
-
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
62
|
-
width: auto;
|
|
63
|
-
right: auto;
|
|
64
|
-
position: relative;
|
|
65
|
-
${({ type }) => type === 'standard'
|
|
66
|
-
&& css`
|
|
67
|
-
position: absolute;
|
|
68
|
-
right: -2rem;
|
|
69
|
-
top: 0;
|
|
70
|
-
bottom: 0;
|
|
71
|
-
`};
|
|
72
76
|
}
|
|
73
77
|
`;
|
|
74
78
|
|
|
75
79
|
const StyledLink = styled.a`
|
|
76
80
|
${props => (props.type === 'button' ? buttonStyle : linkStyle)}
|
|
81
|
+
|
|
77
82
|
${({ iconFirst }) => iconFirst
|
|
78
83
|
&& css`
|
|
79
84
|
flex-direction: row-reverse;
|
|
@@ -200,14 +200,11 @@ it('renders link styled as button correctly', () => {
|
|
|
200
200
|
display: -ms-inline-flexbox;
|
|
201
201
|
display: inline-flex;
|
|
202
202
|
position: relative;
|
|
203
|
-
padding: 0.5rem 1.25rem;
|
|
204
203
|
-webkit-text-decoration: none;
|
|
205
204
|
text-decoration: none;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
transition: all 0.3s;
|
|
210
|
-
height: 3.125rem;
|
|
205
|
+
-webkit-transition: all 0.2s;
|
|
206
|
+
transition: all 0.2s;
|
|
207
|
+
height: 2.5rem;
|
|
211
208
|
width: 100%;
|
|
212
209
|
-webkit-box-pack: center;
|
|
213
210
|
-webkit-justify-content: center;
|
|
@@ -217,9 +214,14 @@ it('renders link styled as button correctly', () => {
|
|
|
217
214
|
-webkit-box-align: center;
|
|
218
215
|
-ms-flex-align: center;
|
|
219
216
|
align-items: center;
|
|
217
|
+
border: none;
|
|
220
218
|
cursor: pointer;
|
|
219
|
+
padding: 0.6rem 1rem;
|
|
220
|
+
border-radius: 0.5rem;
|
|
221
|
+
background-color: #FFE400;
|
|
222
|
+
color: #000000;
|
|
221
223
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
222
|
-
font-weight:
|
|
224
|
+
font-weight: 700;
|
|
223
225
|
text-transform: inherit;
|
|
224
226
|
-webkit-letter-spacing: 0;
|
|
225
227
|
-moz-letter-spacing: 0;
|
|
@@ -227,14 +229,19 @@ it('renders link styled as button correctly', () => {
|
|
|
227
229
|
letter-spacing: 0;
|
|
228
230
|
font-size: 1rem;
|
|
229
231
|
line-height: 1.25rem;
|
|
230
|
-
font-weight: 700;
|
|
231
|
-
background-color: #FFE400;
|
|
232
|
-
color: #000000;
|
|
233
232
|
}
|
|
234
233
|
|
|
235
|
-
.c0:hover
|
|
234
|
+
.c0:hover,
|
|
235
|
+
.c0:focus,
|
|
236
|
+
.c0:focus-within,
|
|
237
|
+
.c0:focus-visible {
|
|
236
238
|
background-color: #FEFD5A;
|
|
237
|
-
|
|
239
|
+
outline-offset: 3px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.c0:disabled {
|
|
243
|
+
cursor: not-allowed;
|
|
244
|
+
opacity: 0.5;
|
|
238
245
|
}
|
|
239
246
|
|
|
240
247
|
@media (min-width:740px) {
|
|
@@ -259,13 +266,7 @@ it('renders link styled as button correctly', () => {
|
|
|
259
266
|
|
|
260
267
|
@media (min-width:1024px) {
|
|
261
268
|
.c0 {
|
|
262
|
-
|
|
263
|
-
color: #000000;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.c0:hover {
|
|
267
|
-
background-color: #FEFD5A;
|
|
268
|
-
color: #000000;
|
|
269
|
+
width: auto;
|
|
269
270
|
}
|
|
270
271
|
}
|
|
271
272
|
|
|
@@ -60,7 +60,6 @@ it('renders article teaser correctly', () => {
|
|
|
60
60
|
font-family: 'Anton',Impact,sans-serif;
|
|
61
61
|
font-weight: normal;
|
|
62
62
|
line-height: 2rem;
|
|
63
|
-
text-transform: uppercase;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
.c10 span {
|
|
@@ -362,7 +361,6 @@ it('renders press realese correctly', () => {
|
|
|
362
361
|
font-family: 'Anton',Impact,sans-serif;
|
|
363
362
|
font-weight: normal;
|
|
364
363
|
line-height: 2rem;
|
|
365
|
-
text-transform: uppercase;
|
|
366
364
|
}
|
|
367
365
|
|
|
368
366
|
.c10 span {
|
|
@@ -18,7 +18,7 @@ import { Internal } from '../../Atoms/Icons/index';
|
|
|
18
18
|
<CardDs
|
|
19
19
|
target="_blank"
|
|
20
20
|
link="/home"
|
|
21
|
-
linkLabel="
|
|
21
|
+
linkLabel="Find out more"
|
|
22
22
|
imageLow={defaultData.image}
|
|
23
23
|
images={defaultData.images}
|
|
24
24
|
imageAltText="Happy man going to work"
|
|
@@ -66,7 +66,7 @@ import { Download } from '../../Atoms/Icons/index';
|
|
|
66
66
|
<CardDs
|
|
67
67
|
target="blank"
|
|
68
68
|
link="/home"
|
|
69
|
-
linkLabel="
|
|
69
|
+
linkLabel="Find out more"
|
|
70
70
|
backgroundColor="white"
|
|
71
71
|
height="auto"
|
|
72
72
|
icon={<Download colour="white" />}
|
|
@@ -149,7 +149,7 @@ import { Internal } from '../../Atoms/Icons/index';
|
|
|
149
149
|
<CardDs
|
|
150
150
|
target="_blank"
|
|
151
151
|
link="/home"
|
|
152
|
-
linkLabel="
|
|
152
|
+
linkLabel="Find out more"
|
|
153
153
|
imageLow={defaultData.image}
|
|
154
154
|
images={defaultData.images}
|
|
155
155
|
imageAltText="Happy man going to work"
|
|
@@ -33,14 +33,11 @@ exports[`renders Column view correctly 1`] = `
|
|
|
33
33
|
display: -ms-inline-flexbox;
|
|
34
34
|
display: inline-flex;
|
|
35
35
|
position: relative;
|
|
36
|
-
padding: 0.5rem 1.25rem;
|
|
37
36
|
-webkit-text-decoration: none;
|
|
38
37
|
text-decoration: none;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
transition: all 0.3s;
|
|
43
|
-
height: 3.125rem;
|
|
38
|
+
-webkit-transition: all 0.2s;
|
|
39
|
+
transition: all 0.2s;
|
|
40
|
+
height: 2.5rem;
|
|
44
41
|
width: 100%;
|
|
45
42
|
-webkit-box-pack: center;
|
|
46
43
|
-webkit-justify-content: center;
|
|
@@ -50,9 +47,14 @@ exports[`renders Column view correctly 1`] = `
|
|
|
50
47
|
-webkit-box-align: center;
|
|
51
48
|
-ms-flex-align: center;
|
|
52
49
|
align-items: center;
|
|
50
|
+
border: none;
|
|
53
51
|
cursor: pointer;
|
|
52
|
+
padding: 0.6rem 1rem;
|
|
53
|
+
border-radius: 0.5rem;
|
|
54
|
+
background-color: #E52630;
|
|
55
|
+
color: #FFFFFF;
|
|
54
56
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
55
|
-
font-weight:
|
|
57
|
+
font-weight: 700;
|
|
56
58
|
text-transform: inherit;
|
|
57
59
|
-webkit-letter-spacing: 0;
|
|
58
60
|
-moz-letter-spacing: 0;
|
|
@@ -60,14 +62,19 @@ exports[`renders Column view correctly 1`] = `
|
|
|
60
62
|
letter-spacing: 0;
|
|
61
63
|
font-size: 1rem;
|
|
62
64
|
line-height: 1.25rem;
|
|
63
|
-
font-weight: 700;
|
|
64
|
-
background-color: #E52630;
|
|
65
|
-
color: #FFFFFF;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
.c7:hover
|
|
67
|
+
.c7:hover,
|
|
68
|
+
.c7:focus,
|
|
69
|
+
.c7:focus-within,
|
|
70
|
+
.c7:focus-visible {
|
|
69
71
|
background-color: #890B11;
|
|
70
|
-
|
|
72
|
+
outline-offset: 3px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.c7:disabled {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
opacity: 0.5;
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
.c9 {
|
|
@@ -158,13 +165,7 @@ exports[`renders Column view correctly 1`] = `
|
|
|
158
165
|
|
|
159
166
|
@media (min-width:1024px) {
|
|
160
167
|
.c7 {
|
|
161
|
-
|
|
162
|
-
color: #FFFFFF;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.c7:hover {
|
|
166
|
-
background-color: #890B11;
|
|
167
|
-
color: #FFFFFF;
|
|
168
|
+
width: auto;
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
|
|
@@ -213,7 +214,7 @@ exports[`renders Column view correctly 1`] = `
|
|
|
213
214
|
<a
|
|
214
215
|
aria-hidden="true"
|
|
215
216
|
className="c1"
|
|
216
|
-
data-image-cta-copy="
|
|
217
|
+
data-image-cta-copy="Find out more"
|
|
217
218
|
href="/home"
|
|
218
219
|
tabIndex="-1"
|
|
219
220
|
target="_blank"
|
|
@@ -252,13 +253,13 @@ exports[`renders Column view correctly 1`] = `
|
|
|
252
253
|
<a
|
|
253
254
|
className="c7"
|
|
254
255
|
color="red"
|
|
255
|
-
data-button-cta-copy="
|
|
256
|
+
data-button-cta-copy="Find out more"
|
|
256
257
|
href="/home"
|
|
257
258
|
rel={null}
|
|
258
259
|
target="_self"
|
|
259
260
|
type="button"
|
|
260
261
|
>
|
|
261
|
-
|
|
262
|
+
Find out more
|
|
262
263
|
<span
|
|
263
264
|
className="c8"
|
|
264
265
|
type="button"
|
|
@@ -314,14 +315,11 @@ exports[`renders correctly 1`] = `
|
|
|
314
315
|
display: -ms-inline-flexbox;
|
|
315
316
|
display: inline-flex;
|
|
316
317
|
position: relative;
|
|
317
|
-
padding: 0.5rem 1.25rem;
|
|
318
318
|
-webkit-text-decoration: none;
|
|
319
319
|
text-decoration: none;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
transition: all 0.3s;
|
|
324
|
-
height: 3.125rem;
|
|
320
|
+
-webkit-transition: all 0.2s;
|
|
321
|
+
transition: all 0.2s;
|
|
322
|
+
height: 2.5rem;
|
|
325
323
|
width: 100%;
|
|
326
324
|
-webkit-box-pack: center;
|
|
327
325
|
-webkit-justify-content: center;
|
|
@@ -331,9 +329,14 @@ exports[`renders correctly 1`] = `
|
|
|
331
329
|
-webkit-box-align: center;
|
|
332
330
|
-ms-flex-align: center;
|
|
333
331
|
align-items: center;
|
|
332
|
+
border: none;
|
|
334
333
|
cursor: pointer;
|
|
334
|
+
padding: 0.6rem 1rem;
|
|
335
|
+
border-radius: 0.5rem;
|
|
336
|
+
background-color: #E52630;
|
|
337
|
+
color: #FFFFFF;
|
|
335
338
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
336
|
-
font-weight:
|
|
339
|
+
font-weight: 700;
|
|
337
340
|
text-transform: inherit;
|
|
338
341
|
-webkit-letter-spacing: 0;
|
|
339
342
|
-moz-letter-spacing: 0;
|
|
@@ -341,14 +344,19 @@ exports[`renders correctly 1`] = `
|
|
|
341
344
|
letter-spacing: 0;
|
|
342
345
|
font-size: 1rem;
|
|
343
346
|
line-height: 1.25rem;
|
|
344
|
-
font-weight: 700;
|
|
345
|
-
background-color: #E52630;
|
|
346
|
-
color: #FFFFFF;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
.c7:hover
|
|
349
|
+
.c7:hover,
|
|
350
|
+
.c7:focus,
|
|
351
|
+
.c7:focus-within,
|
|
352
|
+
.c7:focus-visible {
|
|
350
353
|
background-color: #890B11;
|
|
351
|
-
|
|
354
|
+
outline-offset: 3px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.c7:disabled {
|
|
358
|
+
cursor: not-allowed;
|
|
359
|
+
opacity: 0.5;
|
|
352
360
|
}
|
|
353
361
|
|
|
354
362
|
.c9 {
|
|
@@ -439,13 +447,7 @@ exports[`renders correctly 1`] = `
|
|
|
439
447
|
|
|
440
448
|
@media (min-width:1024px) {
|
|
441
449
|
.c7 {
|
|
442
|
-
|
|
443
|
-
color: #FFFFFF;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.c7:hover {
|
|
447
|
-
background-color: #890B11;
|
|
448
|
-
color: #FFFFFF;
|
|
450
|
+
width: auto;
|
|
449
451
|
}
|
|
450
452
|
}
|
|
451
453
|
|
|
@@ -58,7 +58,7 @@ const Countdown = ({
|
|
|
58
58
|
<Text color={color} family="Anton" size="xl">
|
|
59
59
|
{countdownTime.days}
|
|
60
60
|
</Text>
|
|
61
|
-
<Text color={color} size="xs"
|
|
61
|
+
<Text color={color} size="xs">
|
|
62
62
|
days
|
|
63
63
|
</Text>
|
|
64
64
|
</Digits>
|
|
@@ -69,7 +69,7 @@ const Countdown = ({
|
|
|
69
69
|
<Text color={color} family="Anton" size="xl">
|
|
70
70
|
{countdownTime.hours}
|
|
71
71
|
</Text>
|
|
72
|
-
<Text color={color} size="xs"
|
|
72
|
+
<Text color={color} size="xs">
|
|
73
73
|
hours
|
|
74
74
|
</Text>
|
|
75
75
|
</Digits>
|
|
@@ -80,7 +80,7 @@ const Countdown = ({
|
|
|
80
80
|
<Text color={color} family="Anton" size="xl">
|
|
81
81
|
{countdownTime.minutes}
|
|
82
82
|
</Text>
|
|
83
|
-
<Text color={color} size="xs"
|
|
83
|
+
<Text color={color} size="xs">
|
|
84
84
|
minutes
|
|
85
85
|
</Text>
|
|
86
86
|
</Digits>
|
|
@@ -88,7 +88,7 @@ const Countdown = ({
|
|
|
88
88
|
<Text color={color} family="Anton" size="xl">
|
|
89
89
|
{countdownTime.seconds}
|
|
90
90
|
</Text>
|
|
91
|
-
<Text color={color} size="xs"
|
|
91
|
+
<Text color={color} size="xs">
|
|
92
92
|
seconds
|
|
93
93
|
</Text>
|
|
94
94
|
</Digits>
|
|
@@ -124,7 +124,6 @@ const TagWrapper = styled.div`
|
|
|
124
124
|
|
|
125
125
|
const Tag = styled(Text)`
|
|
126
126
|
position: relative;
|
|
127
|
-
text-transform: uppercase;
|
|
128
127
|
`;
|
|
129
128
|
|
|
130
129
|
const Description = styled.div`
|
|
@@ -172,7 +171,6 @@ const Descriptor = ({
|
|
|
172
171
|
tag="h3"
|
|
173
172
|
height="2rem"
|
|
174
173
|
weight="normal"
|
|
175
|
-
uppercase
|
|
176
174
|
family="Anton"
|
|
177
175
|
>
|
|
178
176
|
{title}
|
|
@@ -67,7 +67,6 @@ it('renders article teaser correctly', () => {
|
|
|
67
67
|
font-family: 'Anton',Impact,sans-serif;
|
|
68
68
|
font-weight: normal;
|
|
69
69
|
line-height: 2rem;
|
|
70
|
-
text-transform: uppercase;
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
.c7 span {
|
|
@@ -189,7 +188,6 @@ it('renders article teaser correctly', () => {
|
|
|
189
188
|
|
|
190
189
|
.c11 {
|
|
191
190
|
position: relative;
|
|
192
|
-
text-transform: uppercase;
|
|
193
191
|
}
|
|
194
192
|
|
|
195
193
|
.c12 {
|
|
@@ -42,7 +42,7 @@ const InfoBanner = ({
|
|
|
42
42
|
}) => (
|
|
43
43
|
<Container>
|
|
44
44
|
<Info>
|
|
45
|
-
<Text tag="h3" size="md"
|
|
45
|
+
<Text tag="h3" size="md">
|
|
46
46
|
Project Name
|
|
47
47
|
</Text>
|
|
48
48
|
<Text tag="p" size="s">
|
|
@@ -50,7 +50,7 @@ const InfoBanner = ({
|
|
|
50
50
|
</Text>
|
|
51
51
|
</Info>
|
|
52
52
|
<Info>
|
|
53
|
-
<Text tag="h3" size="md"
|
|
53
|
+
<Text tag="h3" size="md">
|
|
54
54
|
End Date
|
|
55
55
|
</Text>
|
|
56
56
|
<Text tag="p" size="s">
|
|
@@ -58,7 +58,7 @@ const InfoBanner = ({
|
|
|
58
58
|
</Text>
|
|
59
59
|
</Info>
|
|
60
60
|
<Info>
|
|
61
|
-
<Text tag="h3" size="md"
|
|
61
|
+
<Text tag="h3" size="md">
|
|
62
62
|
Funding theme
|
|
63
63
|
</Text>
|
|
64
64
|
<Text tag="p" size="s">
|
|
@@ -68,7 +68,7 @@ const InfoBanner = ({
|
|
|
68
68
|
</Text>
|
|
69
69
|
</Info>
|
|
70
70
|
<Info>
|
|
71
|
-
<Text tag="h3" size="md"
|
|
71
|
+
<Text tag="h3" size="md">
|
|
72
72
|
Amount Awarded
|
|
73
73
|
</Text>
|
|
74
74
|
<Text tag="p" size="s">
|
|
@@ -82,7 +82,7 @@ const InfoBanner = ({
|
|
|
82
82
|
</Text>
|
|
83
83
|
</Info>
|
|
84
84
|
<Info>
|
|
85
|
-
<Text tag="h3" size="md"
|
|
85
|
+
<Text tag="h3" size="md">
|
|
86
86
|
Start Date
|
|
87
87
|
</Text>
|
|
88
88
|
<Text tag="p" size="s">
|
|
@@ -90,7 +90,7 @@ const InfoBanner = ({
|
|
|
90
90
|
</Text>
|
|
91
91
|
</Info>
|
|
92
92
|
<Info>
|
|
93
|
-
<Text tag="h3" size="md"
|
|
93
|
+
<Text tag="h3" size="md">
|
|
94
94
|
Beneficiary Country
|
|
95
95
|
</Text>
|
|
96
96
|
<Text tag="p" size="s">
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
3
|
import TextInputWithDropdown from '../../Atoms/TextInputWithDropdown/TextInputWithDropdown';
|
|
5
4
|
import spacing from '../../../theme/shared/spacing';
|
|
6
5
|
import ButtonWithStates from '../../Atoms/ButtonWithStates/ButtonWithStates';
|
|
7
6
|
|
|
8
|
-
const StyledButton = styled(ButtonWithStates)`${({ theme }) => css`
|
|
9
|
-
color: ${theme.color('grey_dark')};
|
|
10
|
-
border: 2px solid ${theme.color('grey_dark')};
|
|
11
|
-
background-color: ${theme.color('white')};
|
|
12
|
-
padding-left: ${spacing('lg')};
|
|
13
|
-
padding-right: ${spacing('lg')};
|
|
14
|
-
&:hover {
|
|
15
|
-
color: ${theme.color('grey_dark')};
|
|
16
|
-
background-color: ${theme.color('white')};
|
|
17
|
-
}
|
|
18
|
-
`}`;
|
|
19
|
-
|
|
20
7
|
const KEY_CODE_ENTER = 13;
|
|
21
8
|
|
|
22
9
|
/**
|
|
@@ -114,16 +101,18 @@ const Lookup = ({
|
|
|
114
101
|
errorMsg={errorMessage}
|
|
115
102
|
dropdownInstruction={dropdownInstruction}
|
|
116
103
|
/>
|
|
117
|
-
<
|
|
104
|
+
<ButtonWithStates
|
|
118
105
|
type="button"
|
|
119
106
|
onClick={() => handler()}
|
|
120
107
|
loading={isSearching}
|
|
121
108
|
disabled={isSearching}
|
|
122
109
|
loadingText="Searching"
|
|
123
110
|
data-test="lookupButton"
|
|
111
|
+
buttonType="secondary"
|
|
112
|
+
color="black"
|
|
124
113
|
>
|
|
125
114
|
{buttonText}
|
|
126
|
-
</
|
|
115
|
+
</ButtonWithStates>
|
|
127
116
|
</div>
|
|
128
117
|
);
|
|
129
118
|
};
|