@comicrelief/component-library 8.77.7 → 8.79.0
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/index.cjs.js +921 -848
- package/dist/index.es.js +10828 -10653
- package/package.json +1 -1
- package/src/components/Atoms/Button/Button.js +48 -6
- package/src/components/Atoms/Button/Button.style.js +46 -3
- package/src/components/Atoms/Button/Button.test.js +5 -2
- package/src/components/Atoms/Button/ButtonExample.jsx +263 -0
- package/src/components/Atoms/Icons/Cross.js +10 -3
- package/src/components/Atoms/Link/Link.style.js +2 -1
- package/src/components/Atoms/Link/Link.test.js +3 -1
- package/src/components/Atoms/Logos/Logo.js +4 -4
- package/src/components/Atoms/Logos/LogoExample.jsx +2 -7
- package/src/components/Atoms/Logos/assets/cr-logo--wide.svg +14 -0
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +28 -28
- package/src/components/Molecules/CTA/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +56 -56
- package/src/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap +14 -14
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +34 -30
- package/src/components/Molecules/EmailSignUp/EmailSignUp.style.js +2 -0
- package/src/components/Molecules/HeroBanner/__snapshots__/HeroBanner.test.js.snap +56 -56
- package/src/components/Molecules/LogoLinked/LogoLinked.js +68 -34
- package/src/components/Molecules/LogoLinked/LogoLinked.style.js +27 -0
- package/src/components/Molecules/LogoLinked/LogoLinkedExample.jsx +26 -7
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +14 -14
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +34 -30
- package/src/components/Molecules/QuoteSlice/__snapshots__/QuoteSlice.test.js.snap +3 -1
- package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +56 -56
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +62 -58
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +17 -15
- package/src/components/Organisms/CookieBanner/CookieBanner.test.js +3 -1
- package/src/components/Organisms/DonateBanner/DonateBanner.style.js +4 -1
- package/src/components/Organisms/DonateBanner/__snapshots__/DonateBanner.test.js.snap +12 -4
- package/src/components/Organisms/DynamicGallery/__snapshots__/DynamicGallery.test.js.snap +12 -4
- package/src/components/Organisms/EmailBanner/EmailBanner.style.js +0 -7
- package/src/components/Organisms/EmailBanner/__snapshots__/EmailBanner.test.js.snap +20 -36
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +5 -2
- package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +12 -4
- package/src/components/Organisms/Membership/Membership.test.js +14 -14
- package/src/data/data.js +6 -1
- package/src/theme/crTheme/buttonColors.js +21 -4
- package/src/components/Atoms/Logos/assets/sr-gameon-logo.svg +0 -1
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`handles data structure correctly 1`] = `
|
|
4
|
+
.c11 {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.c12 {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: block;
|
|
15
|
+
object-fit: cover;
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
.c15 {
|
|
5
19
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
6
20
|
font-weight: 400;
|
|
@@ -28,20 +42,6 @@ exports[`handles data structure correctly 1`] = `
|
|
|
28
42
|
text-decoration: none;
|
|
29
43
|
}
|
|
30
44
|
|
|
31
|
-
.c11 {
|
|
32
|
-
display: block;
|
|
33
|
-
width: 100%;
|
|
34
|
-
height: 100%;
|
|
35
|
-
position: relative;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.c12 {
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
display: block;
|
|
42
|
-
object-fit: cover;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
45
|
.c20 {
|
|
46
46
|
height: 4px;
|
|
47
47
|
width: 100%;
|
|
@@ -703,6 +703,20 @@ exports[`handles data structure correctly 1`] = `
|
|
|
703
703
|
`;
|
|
704
704
|
|
|
705
705
|
exports[`renders 2 columns layout correctly 1`] = `
|
|
706
|
+
.c11 {
|
|
707
|
+
display: block;
|
|
708
|
+
width: 100%;
|
|
709
|
+
height: 100%;
|
|
710
|
+
position: relative;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.c12 {
|
|
714
|
+
width: 100%;
|
|
715
|
+
height: 100%;
|
|
716
|
+
display: block;
|
|
717
|
+
object-fit: cover;
|
|
718
|
+
}
|
|
719
|
+
|
|
706
720
|
.c15 {
|
|
707
721
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
708
722
|
font-weight: 400;
|
|
@@ -730,20 +744,6 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
730
744
|
text-decoration: none;
|
|
731
745
|
}
|
|
732
746
|
|
|
733
|
-
.c11 {
|
|
734
|
-
display: block;
|
|
735
|
-
width: 100%;
|
|
736
|
-
height: 100%;
|
|
737
|
-
position: relative;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
.c12 {
|
|
741
|
-
width: 100%;
|
|
742
|
-
height: 100%;
|
|
743
|
-
display: block;
|
|
744
|
-
object-fit: cover;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
747
|
.c20 {
|
|
748
748
|
height: 4px;
|
|
749
749
|
width: 100%;
|
|
@@ -1438,6 +1438,20 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
1438
1438
|
`;
|
|
1439
1439
|
|
|
1440
1440
|
exports[`renders carousel mode correctly 1`] = `
|
|
1441
|
+
.c11 {
|
|
1442
|
+
display: block;
|
|
1443
|
+
width: 100%;
|
|
1444
|
+
height: 100%;
|
|
1445
|
+
position: relative;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
.c12 {
|
|
1449
|
+
width: 100%;
|
|
1450
|
+
height: 100%;
|
|
1451
|
+
display: block;
|
|
1452
|
+
object-fit: cover;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1441
1455
|
.c15 {
|
|
1442
1456
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
1443
1457
|
font-weight: 400;
|
|
@@ -1465,20 +1479,6 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
1465
1479
|
text-decoration: none;
|
|
1466
1480
|
}
|
|
1467
1481
|
|
|
1468
|
-
.c11 {
|
|
1469
|
-
display: block;
|
|
1470
|
-
width: 100%;
|
|
1471
|
-
height: 100%;
|
|
1472
|
-
position: relative;
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
.c12 {
|
|
1476
|
-
width: 100%;
|
|
1477
|
-
height: 100%;
|
|
1478
|
-
display: block;
|
|
1479
|
-
object-fit: cover;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
1482
|
.c20 {
|
|
1483
1483
|
height: 4px;
|
|
1484
1484
|
width: 100%;
|
|
@@ -2153,6 +2153,20 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
2153
2153
|
`;
|
|
2154
2154
|
|
|
2155
2155
|
exports[`renders correctly with data prop 1`] = `
|
|
2156
|
+
.c11 {
|
|
2157
|
+
display: block;
|
|
2158
|
+
width: 100%;
|
|
2159
|
+
height: 100%;
|
|
2160
|
+
position: relative;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
.c12 {
|
|
2164
|
+
width: 100%;
|
|
2165
|
+
height: 100%;
|
|
2166
|
+
display: block;
|
|
2167
|
+
object-fit: cover;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2156
2170
|
.c15 {
|
|
2157
2171
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
2158
2172
|
font-weight: 400;
|
|
@@ -2180,20 +2194,6 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
2180
2194
|
text-decoration: none;
|
|
2181
2195
|
}
|
|
2182
2196
|
|
|
2183
|
-
.c11 {
|
|
2184
|
-
display: block;
|
|
2185
|
-
width: 100%;
|
|
2186
|
-
height: 100%;
|
|
2187
|
-
position: relative;
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
.c12 {
|
|
2191
|
-
width: 100%;
|
|
2192
|
-
height: 100%;
|
|
2193
|
-
display: block;
|
|
2194
|
-
object-fit: cover;
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
2197
|
.c20 {
|
|
2198
2198
|
height: 4px;
|
|
2199
2199
|
width: 100%;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders correctly with data prop 1`] = `
|
|
4
|
+
.c9 {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.c10 {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: block;
|
|
15
|
+
object-fit: cover;
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
.c14 {
|
|
5
19
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
6
20
|
font-weight: 400;
|
|
@@ -28,20 +42,6 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
28
42
|
text-decoration: none;
|
|
29
43
|
}
|
|
30
44
|
|
|
31
|
-
.c9 {
|
|
32
|
-
display: block;
|
|
33
|
-
width: 100%;
|
|
34
|
-
height: 100%;
|
|
35
|
-
position: relative;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.c10 {
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
display: block;
|
|
42
|
-
object-fit: cover;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
45
|
.c19 {
|
|
46
46
|
height: 4px;
|
|
47
47
|
width: 100%;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders Column view correctly 1`] = `
|
|
4
|
+
.c3 {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: auto;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.c4 {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: auto;
|
|
14
|
+
display: block;
|
|
15
|
+
object-fit: cover;
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
.c9 {
|
|
5
19
|
fill: #FFFFFF;
|
|
6
20
|
}
|
|
@@ -17,7 +31,8 @@ exports[`renders Column view correctly 1`] = `
|
|
|
17
31
|
position: relative;
|
|
18
32
|
text-decoration: none;
|
|
19
33
|
transition: all 0.2s;
|
|
20
|
-
height:
|
|
34
|
+
height: auto;
|
|
35
|
+
min-height: 3rem;
|
|
21
36
|
width: 100%;
|
|
22
37
|
justify-content: center;
|
|
23
38
|
align-items: center;
|
|
@@ -40,6 +55,7 @@ exports[`renders Column view correctly 1`] = `
|
|
|
40
55
|
.c7:focus-within,
|
|
41
56
|
.c7:focus-visible {
|
|
42
57
|
background-color: #890B11;
|
|
58
|
+
color: #FFFFFF;
|
|
43
59
|
outline-offset: 3px;
|
|
44
60
|
}
|
|
45
61
|
|
|
@@ -48,20 +64,6 @@ exports[`renders Column view correctly 1`] = `
|
|
|
48
64
|
opacity: 0.5;
|
|
49
65
|
}
|
|
50
66
|
|
|
51
|
-
.c3 {
|
|
52
|
-
display: block;
|
|
53
|
-
width: 100%;
|
|
54
|
-
height: auto;
|
|
55
|
-
position: relative;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.c4 {
|
|
59
|
-
width: 100%;
|
|
60
|
-
height: auto;
|
|
61
|
-
display: block;
|
|
62
|
-
object-fit: cover;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
67
|
.c0 {
|
|
66
68
|
display: flex;
|
|
67
69
|
position: relative;
|
|
@@ -251,6 +253,20 @@ exports[`renders Column view correctly 1`] = `
|
|
|
251
253
|
`;
|
|
252
254
|
|
|
253
255
|
exports[`renders correctly 1`] = `
|
|
256
|
+
.c3 {
|
|
257
|
+
display: block;
|
|
258
|
+
width: 100%;
|
|
259
|
+
height: auto;
|
|
260
|
+
position: relative;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.c4 {
|
|
264
|
+
width: 100%;
|
|
265
|
+
height: auto;
|
|
266
|
+
display: block;
|
|
267
|
+
object-fit: cover;
|
|
268
|
+
}
|
|
269
|
+
|
|
254
270
|
.c9 {
|
|
255
271
|
fill: #FFFFFF;
|
|
256
272
|
}
|
|
@@ -267,7 +283,8 @@ exports[`renders correctly 1`] = `
|
|
|
267
283
|
position: relative;
|
|
268
284
|
text-decoration: none;
|
|
269
285
|
transition: all 0.2s;
|
|
270
|
-
height:
|
|
286
|
+
height: auto;
|
|
287
|
+
min-height: 3rem;
|
|
271
288
|
width: 100%;
|
|
272
289
|
justify-content: center;
|
|
273
290
|
align-items: center;
|
|
@@ -290,6 +307,7 @@ exports[`renders correctly 1`] = `
|
|
|
290
307
|
.c7:focus-within,
|
|
291
308
|
.c7:focus-visible {
|
|
292
309
|
background-color: #890B11;
|
|
310
|
+
color: #FFFFFF;
|
|
293
311
|
outline-offset: 3px;
|
|
294
312
|
}
|
|
295
313
|
|
|
@@ -298,20 +316,6 @@ exports[`renders correctly 1`] = `
|
|
|
298
316
|
opacity: 0.5;
|
|
299
317
|
}
|
|
300
318
|
|
|
301
|
-
.c3 {
|
|
302
|
-
display: block;
|
|
303
|
-
width: 100%;
|
|
304
|
-
height: auto;
|
|
305
|
-
position: relative;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.c4 {
|
|
309
|
-
width: 100%;
|
|
310
|
-
height: auto;
|
|
311
|
-
display: block;
|
|
312
|
-
object-fit: cover;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
319
|
.c0 {
|
|
316
320
|
display: flex;
|
|
317
321
|
position: relative;
|
|
@@ -105,6 +105,8 @@ export const StyledEmailSignUpButton = styled(Button)`
|
|
|
105
105
|
border-radius: 0.5rem;
|
|
106
106
|
overflow: hidden;
|
|
107
107
|
min-width: max-content;
|
|
108
|
+
// Customised for this context
|
|
109
|
+
min-height: 2.25rem;
|
|
108
110
|
width: 100%;
|
|
109
111
|
|
|
110
112
|
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
|
|
4
|
+
.c3 {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.c4 {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: block;
|
|
15
|
+
object-fit: cover;
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
.c8 {
|
|
5
19
|
font-family: 'Anton',Impact,sans-serif;
|
|
6
20
|
font-weight: 400;
|
|
@@ -37,20 +51,6 @@ exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
|
|
|
37
51
|
line-height: inherit;
|
|
38
52
|
}
|
|
39
53
|
|
|
40
|
-
.c3 {
|
|
41
|
-
display: block;
|
|
42
|
-
width: 100%;
|
|
43
|
-
height: 100%;
|
|
44
|
-
position: relative;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.c4 {
|
|
48
|
-
width: 100%;
|
|
49
|
-
height: 100%;
|
|
50
|
-
display: block;
|
|
51
|
-
object-fit: cover;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
54
|
.c0 {
|
|
55
55
|
width: 100%;
|
|
56
56
|
height: auto;
|
|
@@ -276,6 +276,20 @@ exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
|
|
|
276
276
|
`;
|
|
277
277
|
|
|
278
278
|
exports[`renders "Half Height Media" Hero Banner correctly 1`] = `
|
|
279
|
+
.c3 {
|
|
280
|
+
display: block;
|
|
281
|
+
width: 100%;
|
|
282
|
+
height: 100%;
|
|
283
|
+
position: relative;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.c4 {
|
|
287
|
+
width: 100%;
|
|
288
|
+
height: 100%;
|
|
289
|
+
display: block;
|
|
290
|
+
object-fit: cover;
|
|
291
|
+
}
|
|
292
|
+
|
|
279
293
|
.c8 {
|
|
280
294
|
font-family: 'Anton',Impact,sans-serif;
|
|
281
295
|
font-weight: 400;
|
|
@@ -312,20 +326,6 @@ exports[`renders "Half Height Media" Hero Banner correctly 1`] = `
|
|
|
312
326
|
line-height: inherit;
|
|
313
327
|
}
|
|
314
328
|
|
|
315
|
-
.c3 {
|
|
316
|
-
display: block;
|
|
317
|
-
width: 100%;
|
|
318
|
-
height: 100%;
|
|
319
|
-
position: relative;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.c4 {
|
|
323
|
-
width: 100%;
|
|
324
|
-
height: 100%;
|
|
325
|
-
display: block;
|
|
326
|
-
object-fit: cover;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
329
|
.c0 {
|
|
330
330
|
width: 100%;
|
|
331
331
|
height: auto;
|
|
@@ -769,34 +769,6 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
|
|
|
769
769
|
`;
|
|
770
770
|
|
|
771
771
|
exports[`renders "Text Banner" Hero Banner correctly 2`] = `
|
|
772
|
-
.c8 {
|
|
773
|
-
font-family: 'Anton',Impact,sans-serif;
|
|
774
|
-
font-weight: 400;
|
|
775
|
-
text-transform: uppercase;
|
|
776
|
-
letter-spacing: 0;
|
|
777
|
-
font-size: 2rem;
|
|
778
|
-
line-height: 2rem;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.c8 span {
|
|
782
|
-
font-size: inherit;
|
|
783
|
-
line-height: inherit;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
.c9 {
|
|
787
|
-
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
788
|
-
font-weight: 400;
|
|
789
|
-
text-transform: inherit;
|
|
790
|
-
letter-spacing: 0;
|
|
791
|
-
font-size: 1rem;
|
|
792
|
-
line-height: 1.25rem;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
.c9 span {
|
|
796
|
-
font-size: inherit;
|
|
797
|
-
line-height: inherit;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
772
|
.c3 {
|
|
801
773
|
display: block;
|
|
802
774
|
width: 100%;
|
|
@@ -825,6 +797,34 @@ exports[`renders "Text Banner" Hero Banner correctly 2`] = `
|
|
|
825
797
|
object-fit: contain;
|
|
826
798
|
}
|
|
827
799
|
|
|
800
|
+
.c8 {
|
|
801
|
+
font-family: 'Anton',Impact,sans-serif;
|
|
802
|
+
font-weight: 400;
|
|
803
|
+
text-transform: uppercase;
|
|
804
|
+
letter-spacing: 0;
|
|
805
|
+
font-size: 2rem;
|
|
806
|
+
line-height: 2rem;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.c8 span {
|
|
810
|
+
font-size: inherit;
|
|
811
|
+
line-height: inherit;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.c9 {
|
|
815
|
+
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
816
|
+
font-weight: 400;
|
|
817
|
+
text-transform: inherit;
|
|
818
|
+
letter-spacing: 0;
|
|
819
|
+
font-size: 1rem;
|
|
820
|
+
line-height: 1.25rem;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.c9 span {
|
|
824
|
+
font-size: inherit;
|
|
825
|
+
line-height: inherit;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
828
|
.c0 {
|
|
829
829
|
width: 100%;
|
|
830
830
|
height: auto;
|
|
@@ -1,60 +1,92 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
3
|
|
|
5
4
|
import Logo from '../../Atoms/Logos/Logo';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const TitleLabel = styled.span`
|
|
9
|
-
line-height: 0;
|
|
10
|
-
font-size: 0;
|
|
11
|
-
color: transparent;
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
const LogoLink = styled.a`
|
|
15
|
-
${({ animateRotate }) => logoRotateAnimation(animateRotate)}
|
|
16
|
-
`;
|
|
5
|
+
import { TitleLabel, LogoLink } from './LogoLinked.style';
|
|
17
6
|
|
|
18
7
|
const LogoLinked = ({
|
|
19
8
|
sizeSm, sizeMd,
|
|
20
|
-
campaign = 'Comic Relief',
|
|
9
|
+
campaign = 'Comic Relief',
|
|
10
|
+
title = 'Go to Comic Relief homepage',
|
|
11
|
+
url = '/',
|
|
12
|
+
animateRotate = false,
|
|
13
|
+
animatePulse = false,
|
|
14
|
+
newTab = false
|
|
21
15
|
}) => {
|
|
22
|
-
if (campaign === 'Sport Relief
|
|
16
|
+
if (campaign === 'Sport Relief') {
|
|
23
17
|
return (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
<LogoLink
|
|
19
|
+
href={url}
|
|
20
|
+
title="Go to Sport Relief homepage"
|
|
21
|
+
target={newTab ? '_blank' : '_self'}
|
|
22
|
+
animateRotate={animateRotate}
|
|
23
|
+
>
|
|
24
|
+
<Logo
|
|
25
|
+
rotate={false}
|
|
26
|
+
campaign="Sport Relief"
|
|
27
|
+
title="Sport Relief in homepage"
|
|
28
|
+
/>
|
|
29
|
+
<TitleLabel>Go to Sport Relief homepage</TitleLabel>
|
|
30
|
+
</LogoLink>
|
|
34
31
|
);
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
if (campaign === '
|
|
34
|
+
if (campaign === 'Pride') {
|
|
38
35
|
return (
|
|
39
|
-
<LogoLink
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
<LogoLink
|
|
37
|
+
href={url}
|
|
38
|
+
title="Go to Comic Relief homepage"
|
|
39
|
+
target={newTab ? '_blank' : '_self'}
|
|
40
|
+
animateRotate={animateRotate}
|
|
41
|
+
>
|
|
42
|
+
<Logo
|
|
43
|
+
rotate={false}
|
|
44
|
+
campaign="Pride"
|
|
45
|
+
title="Go to Comic Relief homepage"
|
|
46
|
+
sizeSm={sizeSm}
|
|
47
|
+
sizeMd={sizeMd}
|
|
48
|
+
/>
|
|
49
|
+
<TitleLabel>Go to Comic Relief homepage</TitleLabel>
|
|
42
50
|
</LogoLink>
|
|
43
51
|
);
|
|
44
52
|
}
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
// Our 'modern' alt, as used within the CRcom header nav
|
|
55
|
+
// (which exists 100% within that codebase, for now):
|
|
56
|
+
if (campaign === 'Comic Relief wide') {
|
|
47
57
|
return (
|
|
48
|
-
<LogoLink
|
|
49
|
-
|
|
58
|
+
<LogoLink
|
|
59
|
+
href={url}
|
|
60
|
+
title="Go to Comic Relief homepage"
|
|
61
|
+
target={newTab ? '_blank' : '_self'}
|
|
62
|
+
animatePulse={animatePulse}
|
|
63
|
+
>
|
|
64
|
+
<Logo
|
|
65
|
+
rotate={false}
|
|
66
|
+
campaign="Comic Relief wide"
|
|
67
|
+
title="Go to Comic Relief homepage"
|
|
68
|
+
sizeSm={sizeSm}
|
|
69
|
+
sizeMd={sizeMd}
|
|
70
|
+
/>
|
|
50
71
|
<TitleLabel>Go to Comic Relief homepage</TitleLabel>
|
|
51
72
|
</LogoLink>
|
|
52
73
|
);
|
|
53
74
|
}
|
|
54
75
|
|
|
55
76
|
return (
|
|
56
|
-
<LogoLink
|
|
57
|
-
|
|
77
|
+
<LogoLink
|
|
78
|
+
href={url}
|
|
79
|
+
title={title}
|
|
80
|
+
target={newTab ? '_blank' : '_self'}
|
|
81
|
+
animateRotate={animateRotate}
|
|
82
|
+
>
|
|
83
|
+
<Logo
|
|
84
|
+
rotate={false}
|
|
85
|
+
campaign="Comic Relief"
|
|
86
|
+
title={title}
|
|
87
|
+
sizeSm={sizeSm}
|
|
88
|
+
sizeMd={sizeMd}
|
|
89
|
+
/>
|
|
58
90
|
<TitleLabel>{title}</TitleLabel>
|
|
59
91
|
</LogoLink>
|
|
60
92
|
);
|
|
@@ -63,10 +95,12 @@ const LogoLinked = ({
|
|
|
63
95
|
LogoLinked.propTypes = {
|
|
64
96
|
campaign: PropTypes.string,
|
|
65
97
|
animateRotate: PropTypes.bool,
|
|
98
|
+
animatePulse: PropTypes.bool,
|
|
66
99
|
title: PropTypes.string,
|
|
67
100
|
url: PropTypes.string,
|
|
68
101
|
sizeSm: PropTypes.string,
|
|
69
|
-
sizeMd: PropTypes.string
|
|
102
|
+
sizeMd: PropTypes.string,
|
|
103
|
+
newTab: PropTypes.bool
|
|
70
104
|
};
|
|
71
105
|
|
|
72
106
|
export default LogoLinked;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { logoRotateAnimation, pulseInAnimation, pulseOutAnimation } from '../../../theme/shared/animations';
|
|
3
|
+
|
|
4
|
+
const TitleLabel = styled.span`
|
|
5
|
+
line-height: 0;
|
|
6
|
+
font-size: 0;
|
|
7
|
+
color: transparent;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
const LogoLink = styled.a`
|
|
11
|
+
${({ animateRotate }) => logoRotateAnimation(animateRotate)}
|
|
12
|
+
|
|
13
|
+
${({ animatePulse }) => animatePulse && css`
|
|
14
|
+
img {
|
|
15
|
+
${pulseOutAnimation};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&:hover,
|
|
19
|
+
&:focus {
|
|
20
|
+
img {
|
|
21
|
+
${pulseInAnimation};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export { TitleLabel, LogoLink };
|
|
@@ -11,23 +11,42 @@ export default function LogoLinkedExample() {
|
|
|
11
11
|
</ExampleContainer>
|
|
12
12
|
|
|
13
13
|
<ExampleContainer>
|
|
14
|
-
<h3>
|
|
15
|
-
<LogoLinked
|
|
14
|
+
<h3>Comic Relief wide, w/pulse animation and new tab functionality</h3>
|
|
15
|
+
<LogoLinked
|
|
16
|
+
campaign="Comic Relief wide"
|
|
17
|
+
sizeSm="150px"
|
|
18
|
+
sizeMd="150px"
|
|
19
|
+
url="https://www.comicrelief.com"
|
|
20
|
+
newTab
|
|
21
|
+
animatePulse
|
|
22
|
+
/>
|
|
16
23
|
</ExampleContainer>
|
|
17
24
|
|
|
18
25
|
<ExampleContainer>
|
|
19
|
-
<h3>Sport Relief
|
|
20
|
-
<LogoLinked
|
|
26
|
+
<h3>Sport Relief</h3>
|
|
27
|
+
<LogoLinked
|
|
28
|
+
campaign="Sport Relief"
|
|
29
|
+
sizeSm="50px"
|
|
30
|
+
sizeMd="60px"
|
|
31
|
+
/>
|
|
21
32
|
</ExampleContainer>
|
|
22
33
|
|
|
23
34
|
<ExampleContainer>
|
|
24
35
|
<h3>Pride</h3>
|
|
25
|
-
<LogoLinked
|
|
36
|
+
<LogoLinked
|
|
37
|
+
campaign="Pride"
|
|
38
|
+
sizeSm="50px"
|
|
39
|
+
sizeMd="60px"
|
|
40
|
+
/>
|
|
26
41
|
</ExampleContainer>
|
|
27
42
|
|
|
28
43
|
<ExampleContainer>
|
|
29
|
-
<h3>
|
|
30
|
-
<LogoLinked
|
|
44
|
+
<h3>Comic Relief (default) w/rotation animation</h3>
|
|
45
|
+
<LogoLinked
|
|
46
|
+
sizeSm="50px"
|
|
47
|
+
sizeMd="60px"
|
|
48
|
+
animateRotate
|
|
49
|
+
/>
|
|
31
50
|
</ExampleContainer>
|
|
32
51
|
</>
|
|
33
52
|
);
|