@comicrelief/component-library 8.44.3 → 8.45.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/components/Atoms/Checkbox/Checkbox.test.js +0 -4
- package/dist/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +0 -2
- package/dist/components/Atoms/Input/input.test.js +0 -2
- package/dist/components/Atoms/RadioButton/RadioButton.test.js +0 -4
- package/dist/components/Atoms/Select/__snapshots__/Select.test.js.snap +0 -1
- package/dist/components/Atoms/SocialIcons/Icon/Icon.js +39 -14
- package/dist/components/Atoms/SocialIcons/SocialIcons.js +91 -22
- package/dist/components/Atoms/SocialIcons/Utils/Icons.js +26 -7
- package/dist/components/Atoms/SocialIcons/Utils/Links.js +10 -0
- package/dist/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +63 -48
- package/{src/components/Atoms/SocialIcons/assets → dist/components/Atoms/SocialIcons/assets/circled}/facebook.svg +1 -1
- package/{src/components/Atoms/SocialIcons/assets → dist/components/Atoms/SocialIcons/assets/circled}/twitter.svg +1 -1
- package/dist/components/Atoms/SocialIcons/assets/{youtube.svg → circled/youtube.svg} +1 -1
- package/dist/components/Atoms/SocialIcons/assets/standard/facebook.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/instagram.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/tiktok.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/x.svg +3 -0
- package/dist/components/Atoms/SocialIcons/assets/standard/youtube.svg +3 -0
- package/dist/components/Atoms/Text/Text.js +28 -28
- package/dist/components/Atoms/Text/Text.md +8 -8
- package/dist/components/Atoms/Text/__snapshots__/Text.test.js.snap +0 -9
- package/dist/components/Atoms/TextArea/TextArea.test.js +0 -1
- package/dist/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +0 -7
- package/dist/components/Molecules/Accordion/__snapshots__/Accordion.test.js.snap +0 -4
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +0 -10
- package/dist/components/Molecules/Banner/__snapshots__/Banner.test.js.snap +0 -2
- package/dist/components/Molecules/Descriptor/Descriptor.test.js +0 -13
- package/dist/components/Molecules/EmailSignUp/EmailSignUp.js +38 -0
- package/dist/components/Molecules/EmailSignUp/EmailSignUp.style.js +113 -0
- package/dist/components/Molecules/InfoBanner/__snapshots__/InfoBanner.test.js.snap +0 -24
- package/dist/components/Molecules/LogoLinked/LogoLinked.js +6 -6
- package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +0 -2
- package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +0 -8
- package/dist/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +0 -1
- package/dist/components/Molecules/SearchInput/SearchInput.test.js +0 -1
- package/dist/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +0 -18
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +0 -14
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +0 -4
- package/dist/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +0 -1
- package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +0 -2
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +0 -35
- package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +0 -8
- package/dist/components/Organisms/Footer/Footer.md +12 -11
- package/dist/components/Organisms/Footer/FundraisingRegulatorLogo/FundraisingRegulatorLogo.js +36 -16
- package/dist/components/Organisms/Footer/Nav/Nav.style.js +8 -8
- package/dist/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +188 -241
- package/dist/components/Organisms/FooterNew/FooterNew.js +136 -0
- package/dist/components/Organisms/FooterNew/FooterNew.md +47 -0
- package/dist/components/Organisms/FooterNew/FooterNew.style.js +312 -0
- package/dist/components/Organisms/FooterNew/FooterNew.test.js +20 -0
- package/dist/components/Organisms/FooterNew/Nav/PrimaryNav.js +32 -0
- package/dist/components/Organisms/FooterNew/Nav/SecondaryNav.js +32 -0
- package/dist/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +1490 -0
- package/dist/components/Organisms/FooterNew/dev-data/data.js +106 -0
- package/dist/components/Organisms/Membership/Membership.test.js +0 -12
- package/dist/components/Organisms/WYMDCarousel/__snapshots__/WYMDCarousel.test.js.snap +0 -3
- package/dist/index.js +20 -0
- package/dist/theme/crTheme/colors.js +12 -7
- package/dist/theme/shared/animations.js +46 -0
- package/package.json +1 -1
- package/src/components/Atoms/Checkbox/Checkbox.test.js +0 -4
- package/src/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +0 -2
- package/src/components/Atoms/Input/input.test.js +0 -2
- package/src/components/Atoms/RadioButton/RadioButton.test.js +0 -4
- package/src/components/Atoms/Select/__snapshots__/Select.test.js.snap +0 -1
- package/src/components/Atoms/SocialIcons/Icon/Icon.js +47 -11
- package/src/components/Atoms/SocialIcons/SocialIcons.js +99 -25
- package/src/components/Atoms/SocialIcons/Utils/Icons.js +29 -10
- package/src/components/Atoms/SocialIcons/Utils/Links.js +10 -0
- package/src/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +63 -48
- package/{dist/components/Atoms/SocialIcons/assets → src/components/Atoms/SocialIcons/assets/circled}/facebook.svg +1 -1
- package/{dist/components/Atoms/SocialIcons/assets → src/components/Atoms/SocialIcons/assets/circled}/twitter.svg +1 -1
- package/src/components/Atoms/SocialIcons/assets/{youtube.svg → circled/youtube.svg} +1 -1
- package/src/components/Atoms/SocialIcons/assets/standard/facebook.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/instagram.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/tiktok.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/x.svg +3 -0
- package/src/components/Atoms/SocialIcons/assets/standard/youtube.svg +3 -0
- package/src/components/Atoms/Text/Text.js +19 -19
- package/src/components/Atoms/Text/Text.md +8 -8
- package/src/components/Atoms/Text/__snapshots__/Text.test.js.snap +0 -9
- package/src/components/Atoms/TextArea/TextArea.test.js +0 -1
- package/src/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +0 -7
- package/src/components/Molecules/Accordion/__snapshots__/Accordion.test.js.snap +0 -4
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +0 -10
- package/src/components/Molecules/Banner/__snapshots__/Banner.test.js.snap +0 -2
- package/src/components/Molecules/Descriptor/Descriptor.test.js +0 -13
- package/src/components/Molecules/EmailSignUp/EmailSignUp.js +55 -0
- package/src/components/Molecules/EmailSignUp/EmailSignUp.style.js +107 -0
- package/src/components/Molecules/InfoBanner/__snapshots__/InfoBanner.test.js.snap +0 -24
- package/src/components/Molecules/LogoLinked/LogoLinked.js +5 -14
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +0 -2
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +0 -8
- package/src/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +0 -1
- package/src/components/Molecules/SearchInput/SearchInput.test.js +0 -1
- package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +0 -18
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +0 -14
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +0 -4
- package/src/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +0 -1
- package/src/components/Organisms/CookieBanner/CookieBanner.test.js +0 -2
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +0 -35
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +0 -8
- package/src/components/Organisms/Footer/Footer.md +12 -11
- package/src/components/Organisms/Footer/FundraisingRegulatorLogo/FundraisingRegulatorLogo.js +14 -3
- package/src/components/Organisms/Footer/Nav/Nav.style.js +8 -8
- package/src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +188 -241
- package/src/components/Organisms/FooterNew/FooterNew.js +211 -0
- package/src/components/Organisms/FooterNew/FooterNew.md +47 -0
- package/src/components/Organisms/FooterNew/FooterNew.style.js +294 -0
- package/src/components/Organisms/FooterNew/FooterNew.test.js +24 -0
- package/src/components/Organisms/FooterNew/Nav/PrimaryNav.js +54 -0
- package/src/components/Organisms/FooterNew/Nav/SecondaryNav.js +54 -0
- package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +1490 -0
- package/src/components/Organisms/FooterNew/dev-data/data.js +123 -0
- package/src/components/Organisms/Membership/Membership.test.js +0 -12
- package/src/components/Organisms/WYMDCarousel/__snapshots__/WYMDCarousel.test.js.snap +0 -3
- package/src/index.js +2 -0
- package/src/theme/crTheme/colors.js +13 -7
- package/src/theme/shared/animations.js +60 -0
- /package/dist/components/Atoms/SocialIcons/assets/{X-white-Subtract.svg → circled/X-white-Subtract.svg} +0 -0
- /package/dist/components/Atoms/SocialIcons/assets/{instagram.svg → circled/instagram.svg} +0 -0
- /package/src/components/Atoms/SocialIcons/assets/{X-white-Subtract.svg → circled/X-white-Subtract.svg} +0 -0
- /package/src/components/Atoms/SocialIcons/assets/{instagram.svg → circled/instagram.svg} +0 -0
|
@@ -665,15 +665,11 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
|
|
|
665
665
|
>
|
|
666
666
|
<h2
|
|
667
667
|
className="c4"
|
|
668
|
-
color="white"
|
|
669
|
-
size="big"
|
|
670
668
|
>
|
|
671
669
|
Donate Now
|
|
672
670
|
</h2>
|
|
673
671
|
<p
|
|
674
672
|
className="c5"
|
|
675
|
-
color="white"
|
|
676
|
-
size="m"
|
|
677
673
|
>
|
|
678
674
|
Please help us fund life-changing projects in the UK and around the world.
|
|
679
675
|
</p>
|
|
@@ -737,8 +733,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
|
|
|
737
733
|
>
|
|
738
734
|
<span
|
|
739
735
|
className="c16"
|
|
740
|
-
color="inherit"
|
|
741
|
-
size="l"
|
|
742
736
|
>
|
|
743
737
|
Enter an amount to give
|
|
744
738
|
</span>
|
|
@@ -752,7 +746,6 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
|
|
|
752
746
|
>
|
|
753
747
|
<span
|
|
754
748
|
className="c20 c21"
|
|
755
|
-
color="inherit"
|
|
756
749
|
dangerouslySetInnerHTML={
|
|
757
750
|
Object {
|
|
758
751
|
"__html": "£",
|
|
@@ -1473,15 +1466,11 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1473
1466
|
>
|
|
1474
1467
|
<h2
|
|
1475
1468
|
className="c4"
|
|
1476
|
-
color="white"
|
|
1477
|
-
size="big"
|
|
1478
1469
|
>
|
|
1479
1470
|
Donate Now
|
|
1480
1471
|
</h2>
|
|
1481
1472
|
<p
|
|
1482
1473
|
className="c5"
|
|
1483
|
-
color="white"
|
|
1484
|
-
size="m"
|
|
1485
1474
|
>
|
|
1486
1475
|
Please help us fund life-changing projects in the UK and around the world.
|
|
1487
1476
|
</p>
|
|
@@ -1545,8 +1534,6 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1545
1534
|
>
|
|
1546
1535
|
<span
|
|
1547
1536
|
className="c15"
|
|
1548
|
-
color="inherit"
|
|
1549
|
-
size="l"
|
|
1550
1537
|
>
|
|
1551
1538
|
Choose an amount to give
|
|
1552
1539
|
</span>
|
|
@@ -1556,8 +1543,6 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1556
1543
|
>
|
|
1557
1544
|
<span
|
|
1558
1545
|
className="c17 c18"
|
|
1559
|
-
color="inherit"
|
|
1560
|
-
size="s"
|
|
1561
1546
|
>
|
|
1562
1547
|
Other amount
|
|
1563
1548
|
</span>
|
|
@@ -1567,7 +1552,6 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1567
1552
|
>
|
|
1568
1553
|
<span
|
|
1569
1554
|
className="c21 c22"
|
|
1570
|
-
color="inherit"
|
|
1571
1555
|
dangerouslySetInnerHTML={
|
|
1572
1556
|
Object {
|
|
1573
1557
|
"__html": "£",
|
|
@@ -2306,15 +2290,11 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2306
2290
|
>
|
|
2307
2291
|
<h2
|
|
2308
2292
|
className="c4"
|
|
2309
|
-
color="white"
|
|
2310
|
-
size="big"
|
|
2311
2293
|
>
|
|
2312
2294
|
Donate Now
|
|
2313
2295
|
</h2>
|
|
2314
2296
|
<p
|
|
2315
2297
|
className="c5"
|
|
2316
|
-
color="white"
|
|
2317
|
-
size="m"
|
|
2318
2298
|
>
|
|
2319
2299
|
Please help us fund life-changing projects in the UK and around the world.
|
|
2320
2300
|
</p>
|
|
@@ -2335,8 +2315,6 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2335
2315
|
>
|
|
2336
2316
|
<span
|
|
2337
2317
|
className="c10"
|
|
2338
|
-
color="inherit"
|
|
2339
|
-
size="l"
|
|
2340
2318
|
>
|
|
2341
2319
|
Choose an amount to give
|
|
2342
2320
|
</span>
|
|
@@ -2350,7 +2328,6 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2350
2328
|
>
|
|
2351
2329
|
<span
|
|
2352
2330
|
className="c14 c15"
|
|
2353
|
-
color="inherit"
|
|
2354
2331
|
dangerouslySetInnerHTML={
|
|
2355
2332
|
Object {
|
|
2356
2333
|
"__html": "",
|
|
@@ -2387,7 +2364,6 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2387
2364
|
>
|
|
2388
2365
|
<span
|
|
2389
2366
|
className="c14 c15"
|
|
2390
|
-
color="inherit"
|
|
2391
2367
|
dangerouslySetInnerHTML={
|
|
2392
2368
|
Object {
|
|
2393
2369
|
"__html": "",
|
|
@@ -2424,7 +2400,6 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2424
2400
|
>
|
|
2425
2401
|
<span
|
|
2426
2402
|
className="c14 c15"
|
|
2427
|
-
color="inherit"
|
|
2428
2403
|
dangerouslySetInnerHTML={
|
|
2429
2404
|
Object {
|
|
2430
2405
|
"__html": "",
|
|
@@ -2461,8 +2436,6 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2461
2436
|
>
|
|
2462
2437
|
<span
|
|
2463
2438
|
className="c21 c22"
|
|
2464
|
-
color="inherit"
|
|
2465
|
-
size="s"
|
|
2466
2439
|
>
|
|
2467
2440
|
Other amount
|
|
2468
2441
|
</span>
|
|
@@ -2472,7 +2445,6 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2472
2445
|
>
|
|
2473
2446
|
<span
|
|
2474
2447
|
className="c14 c15"
|
|
2475
|
-
color="inherit"
|
|
2476
2448
|
dangerouslySetInnerHTML={
|
|
2477
2449
|
Object {
|
|
2478
2450
|
"__html": "£",
|
|
@@ -3045,15 +3017,11 @@ exports[`Single donation with no Money Buys renders correctly 1`] = `
|
|
|
3045
3017
|
>
|
|
3046
3018
|
<h2
|
|
3047
3019
|
className="c4"
|
|
3048
|
-
color="white"
|
|
3049
|
-
size="big"
|
|
3050
3020
|
>
|
|
3051
3021
|
Donate Now
|
|
3052
3022
|
</h2>
|
|
3053
3023
|
<p
|
|
3054
3024
|
className="c5"
|
|
3055
|
-
color="white"
|
|
3056
|
-
size="m"
|
|
3057
3025
|
>
|
|
3058
3026
|
Please help us fund life-changing projects in the UK and around the world.
|
|
3059
3027
|
</p>
|
|
@@ -3074,8 +3042,6 @@ exports[`Single donation with no Money Buys renders correctly 1`] = `
|
|
|
3074
3042
|
>
|
|
3075
3043
|
<span
|
|
3076
3044
|
className="c10"
|
|
3077
|
-
color="inherit"
|
|
3078
|
-
size="l"
|
|
3079
3045
|
>
|
|
3080
3046
|
Overridden via the 'choose amount text' props
|
|
3081
3047
|
</span>
|
|
@@ -3089,7 +3055,6 @@ exports[`Single donation with no Money Buys renders correctly 1`] = `
|
|
|
3089
3055
|
>
|
|
3090
3056
|
<span
|
|
3091
3057
|
className="c14 c15"
|
|
3092
|
-
color="inherit"
|
|
3093
3058
|
dangerouslySetInnerHTML={
|
|
3094
3059
|
Object {
|
|
3095
3060
|
"__html": "£",
|
|
@@ -342,8 +342,6 @@ exports[`renders correctly 1`] = `
|
|
|
342
342
|
>
|
|
343
343
|
<h2
|
|
344
344
|
className="c1 c2"
|
|
345
|
-
color="inherit"
|
|
346
|
-
size="xxl"
|
|
347
345
|
>
|
|
348
346
|
sign up letter
|
|
349
347
|
</h2>
|
|
@@ -352,7 +350,6 @@ exports[`renders correctly 1`] = `
|
|
|
352
350
|
>
|
|
353
351
|
<span
|
|
354
352
|
className="c4"
|
|
355
|
-
color="inherit"
|
|
356
353
|
>
|
|
357
354
|
<div
|
|
358
355
|
className="c5"
|
|
@@ -376,7 +373,6 @@ exports[`renders correctly 1`] = `
|
|
|
376
373
|
>
|
|
377
374
|
<span
|
|
378
375
|
className="c4 c10"
|
|
379
|
-
color="inherit"
|
|
380
376
|
dangerouslySetInnerHTML={
|
|
381
377
|
Object {
|
|
382
378
|
"__html": "First Name",
|
|
@@ -412,7 +408,6 @@ exports[`renders correctly 1`] = `
|
|
|
412
408
|
>
|
|
413
409
|
<span
|
|
414
410
|
className="c4 c10"
|
|
415
|
-
color="inherit"
|
|
416
411
|
dangerouslySetInnerHTML={
|
|
417
412
|
Object {
|
|
418
413
|
"__html": "Last Name",
|
|
@@ -449,7 +444,6 @@ exports[`renders correctly 1`] = `
|
|
|
449
444
|
>
|
|
450
445
|
<span
|
|
451
446
|
className="c4 c10"
|
|
452
|
-
color="inherit"
|
|
453
447
|
dangerouslySetInnerHTML={
|
|
454
448
|
Object {
|
|
455
449
|
"__html": "Email Address",
|
|
@@ -490,7 +484,6 @@ exports[`renders correctly 1`] = `
|
|
|
490
484
|
>
|
|
491
485
|
<span
|
|
492
486
|
className="c4"
|
|
493
|
-
color="inherit"
|
|
494
487
|
>
|
|
495
488
|
Subscribe
|
|
496
489
|
</span>
|
|
@@ -505,7 +498,6 @@ exports[`renders correctly 1`] = `
|
|
|
505
498
|
>
|
|
506
499
|
<span
|
|
507
500
|
className="c4"
|
|
508
|
-
color="inherit"
|
|
509
501
|
>
|
|
510
502
|
<div
|
|
511
503
|
className="c5"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Footer
|
|
2
2
|
|
|
3
3
|
```js
|
|
4
|
+
import Footer from './Footer';
|
|
4
5
|
import data from './data/data';
|
|
5
6
|
import footerCopy from './data/footerCopy';
|
|
6
7
|
|
|
@@ -9,19 +10,19 @@ import footerCopy from './data/footerCopy';
|
|
|
9
10
|
<Footer navItems={data} footerCopy={footerCopy.copy} campaign="Comic Relief" />
|
|
10
11
|
|
|
11
12
|
<p>Overrides allowList functionality for external usage</p>
|
|
12
|
-
<Footer
|
|
13
|
-
navItems={data}
|
|
14
|
-
footerCopy={footerCopy.copy}
|
|
15
|
-
campaign="Comic Relief"
|
|
16
|
-
overrideallowList
|
|
13
|
+
<Footer
|
|
14
|
+
navItems={data}
|
|
15
|
+
footerCopy={footerCopy.copy}
|
|
16
|
+
campaign="Comic Relief"
|
|
17
|
+
overrideallowList
|
|
17
18
|
/>
|
|
18
|
-
|
|
19
|
+
|
|
19
20
|
<p>Adding an additionalLegalLine to the top of the footer, add FR logo</p>
|
|
20
|
-
<Footer
|
|
21
|
-
additionalLegalLine="CHICKEN RUN: DAWN OF THE NUGGET ™/ © Aardman. Netflix ™/© Netflix. Used with permission/Wallace & Gromit Ltd. All rights reserved/ Shaun the Sheep © & TM /Morph ©/TM Aardman Animations Ltd. All rights reserved."
|
|
22
|
-
navItems={data}
|
|
23
|
-
footerCopy={footerCopy.copy}
|
|
24
|
-
campaign="Comic Relief"
|
|
21
|
+
<Footer
|
|
22
|
+
additionalLegalLine="CHICKEN RUN: DAWN OF THE NUGGET ™/ © Aardman. Netflix ™/© Netflix. Used with permission/Wallace & Gromit Ltd. All rights reserved/ Shaun the Sheep © & TM /Morph ©/TM Aardman Animations Ltd. All rights reserved."
|
|
23
|
+
navItems={data}
|
|
24
|
+
footerCopy={footerCopy.copy}
|
|
25
|
+
campaign="Comic Relief"
|
|
25
26
|
showFundraisingRegulatorLogo
|
|
26
27
|
/>
|
|
27
28
|
</>
|
package/src/components/Organisms/Footer/FundraisingRegulatorLogo/FundraisingRegulatorLogo.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import spacing from '../../../../theme/shared/spacing';
|
|
5
|
+
import { springScaleAnimation } from '../../../../theme/shared/animations';
|
|
4
6
|
|
|
5
7
|
const FundraisingRegulatorWrapper = styled.div`
|
|
6
8
|
// Overriding the baked-in styles for ease of update
|
|
7
9
|
width: 75%;
|
|
8
|
-
margin: ${spacing('lg')} 0;
|
|
10
|
+
margin: ${({ $noMargin }) => ($noMargin ? '0' : `${spacing('lg')} 0`)};
|
|
9
11
|
max-width: 200px;
|
|
10
12
|
|
|
11
13
|
img {
|
|
12
14
|
display: block;
|
|
13
15
|
}
|
|
16
|
+
|
|
17
|
+
${({ animateOnHover }) => animateOnHover && springScaleAnimation(true)}
|
|
14
18
|
`;
|
|
15
19
|
|
|
16
|
-
const FundraisingRegulatorLogo = () => (
|
|
17
|
-
<FundraisingRegulatorWrapper>
|
|
20
|
+
const FundraisingRegulatorLogo = ({ animateOnHover = false, noMargin = false }) => (
|
|
21
|
+
<FundraisingRegulatorWrapper animateOnHover={animateOnHover} $noMargin={noMargin}>
|
|
18
22
|
{/* Code from https://www.fundraisingregulator.org.uk/ */}
|
|
19
23
|
{/* eslint-disable-next-line react/jsx-no-target-blank */}
|
|
20
24
|
<a href="https://www.fundraisingregulator.org.uk/validate?registrant=COMIC+RELIEF" className="fr-digital-badge" style={{ height: 'auto', width: '150px', textDecoration: 'none' }} target="_blank">
|
|
@@ -24,3 +28,10 @@ const FundraisingRegulatorLogo = () => (
|
|
|
24
28
|
);
|
|
25
29
|
|
|
26
30
|
export default FundraisingRegulatorLogo;
|
|
31
|
+
|
|
32
|
+
FundraisingRegulatorLogo.propTypes = {
|
|
33
|
+
/** Animate the logo on hover with spring scale animation */
|
|
34
|
+
animateOnHover: PropTypes.bool,
|
|
35
|
+
/** Remove the default margin. The redesigned footer does not need it in some cases. */
|
|
36
|
+
noMargin: PropTypes.bool
|
|
37
|
+
};
|
|
@@ -52,7 +52,7 @@ const SubNavMenu = styled.ul`
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
@media ${({ theme }) => theme.
|
|
55
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
56
56
|
max-height: none;
|
|
57
57
|
height: auto;
|
|
58
58
|
|
|
@@ -74,7 +74,7 @@ const SubNavItem = styled.li`
|
|
|
74
74
|
background-color: inherit;
|
|
75
75
|
padding: 8px 0;
|
|
76
76
|
|
|
77
|
-
@media ${({ theme }) => theme.
|
|
77
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
78
78
|
height: auto;
|
|
79
79
|
margin-top: 12px;
|
|
80
80
|
padding: 0;
|
|
@@ -100,7 +100,7 @@ const SubNavItem = styled.li`
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
@media ${({ theme }) => theme.
|
|
103
|
+
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
104
104
|
${({ column }) => (column === true ? 'flex: 0 0 100%;' : null)};
|
|
105
105
|
}
|
|
106
106
|
`;
|
|
@@ -123,7 +123,7 @@ const NavMenu = styled.ul`
|
|
|
123
123
|
padding: 0 0 ${spacing('xl')};
|
|
124
124
|
border-bottom: 1px solid ${({ theme }) => theme.color('white')};
|
|
125
125
|
|
|
126
|
-
@media ${({ theme }) => theme.
|
|
126
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
127
127
|
display: flex;
|
|
128
128
|
flex-wrap: wrap;
|
|
129
129
|
justify-content: start;
|
|
@@ -146,12 +146,12 @@ const NavItem = styled.li`
|
|
|
146
146
|
margin: 0;
|
|
147
147
|
margin-bottom: 1rem;
|
|
148
148
|
|
|
149
|
-
@media ${({ theme }) => theme.
|
|
149
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
150
150
|
flex: 0 0 30%;
|
|
151
151
|
margin: 0;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
@media ${({ theme }) => theme.
|
|
154
|
+
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
155
155
|
/* Minus 9% to remove 3 x 1.5% margins from previous rule */
|
|
156
156
|
flex: 0 0 calc(25% - 1rem);
|
|
157
157
|
margin-right: 1rem;
|
|
@@ -172,7 +172,7 @@ const NavItem = styled.li`
|
|
|
172
172
|
line-height: 40px;
|
|
173
173
|
font-weight: 700;
|
|
174
174
|
|
|
175
|
-
@media ${({ theme }) => theme.
|
|
175
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
176
176
|
font-size: 20px;
|
|
177
177
|
line-height: 40px;
|
|
178
178
|
}
|
|
@@ -193,7 +193,7 @@ const NavItem = styled.li`
|
|
|
193
193
|
right: -25px;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
@media ${({ theme }) => theme.
|
|
196
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
197
197
|
cursor: default;
|
|
198
198
|
display: inline;
|
|
199
199
|
|