@comicrelief/component-library 8.48.0 → 8.48.2

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.
Files changed (41) hide show
  1. package/dist/components/Atoms/Input/Input.md +1 -0
  2. package/dist/components/Molecules/CTAMultiCard/CTAMultiCard.js +6 -2
  3. package/dist/components/Molecules/CTAMultiCard/CTAMultiCard.md +10 -6
  4. package/dist/components/Molecules/CTAMultiCard/CTAMultiCard.style.js +22 -21
  5. package/dist/components/Molecules/CTAMultiCard/SingleCard.js +1 -1
  6. package/dist/components/Molecules/CTAMultiCard/{ArrowIcon.js → _ArrowIcon.js} +2 -2
  7. package/dist/components/Molecules/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +64 -68
  8. package/dist/components/Molecules/Countdown/Countdown.js +12 -5
  9. package/dist/components/Molecules/Countdown/Countdown.md +1 -1
  10. package/dist/components/Organisms/Header/Nav/Nav.js +1 -1
  11. package/dist/components/Organisms/Header/data/data-extended.js +22 -22
  12. package/dist/components/Organisms/Header/data/data-live.js +1 -1
  13. package/dist/components/Organisms/Header/data/data.js +2 -2
  14. package/dist/components/Organisms/Header2025/Header2025.js +2 -2
  15. package/dist/components/Organisms/Header2025/Header2025.md +2 -2
  16. package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +1 -1
  17. package/dist/components/Organisms/Header2025/data/data-extended.js +23 -23
  18. package/dist/components/Organisms/Header2025/data/data-live--minimal.js +1 -1
  19. package/dist/components/Organisms/Header2025/data/data-live.js +2 -2
  20. package/dist/components/Organisms/Header2025/data/data.js +13 -13
  21. package/package.json +1 -1
  22. package/src/components/Atoms/Input/Input.md +1 -0
  23. package/src/components/Molecules/CTAMultiCard/CTAMultiCard.js +8 -2
  24. package/src/components/Molecules/CTAMultiCard/CTAMultiCard.md +10 -6
  25. package/src/components/Molecules/CTAMultiCard/CTAMultiCard.style.js +49 -43
  26. package/src/components/Molecules/CTAMultiCard/SingleCard.js +1 -1
  27. package/src/components/Molecules/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +64 -68
  28. package/src/components/Molecules/Countdown/Countdown.js +12 -5
  29. package/src/components/Molecules/Countdown/Countdown.md +1 -1
  30. package/src/components/Organisms/Header/Nav/Nav.js +2 -1
  31. package/src/components/Organisms/Header/data/data-extended.js +22 -22
  32. package/src/components/Organisms/Header/data/data-live.js +1 -1
  33. package/src/components/Organisms/Header/data/data.js +2 -2
  34. package/src/components/Organisms/Header2025/Header2025.js +5 -3
  35. package/src/components/Organisms/Header2025/Header2025.md +2 -2
  36. package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +7 -4
  37. package/src/components/Organisms/Header2025/data/data-extended.js +23 -23
  38. package/src/components/Organisms/Header2025/data/data-live--minimal.js +1 -1
  39. package/src/components/Organisms/Header2025/data/data-live.js +2 -2
  40. package/src/components/Organisms/Header2025/data/data.js +13 -13
  41. /package/src/components/Molecules/CTAMultiCard/{ArrowIcon.js → _ArrowIcon.js} +0 -0
@@ -4,32 +4,14 @@ import { breakpointValues } from '../../../theme/shared/allBreakpoints';
4
4
  import fontHelper from '../../../theme/crTheme/fontHelper';
5
5
 
6
6
  const CardsContainer = styled.div`
7
+ padding-top: ${({ paddingAbove }) => paddingAbove};
8
+ padding-bottom: ${({ paddingBelow }) => paddingBelow};
7
9
  display: flex;
8
10
  flex-direction: column;
9
11
  width: 100%;
10
12
  background: ${({ theme, backgroundColor }) => theme.color(backgroundColor)};
11
13
  gap: 1rem;
12
14
 
13
- // Mobile carousel mode - horizontal scroll container (only on mobile, below M breakpoint)
14
- ${({ isCarousel }) => isCarousel && css`
15
- @media (max-width: ${breakpointValues.M - 1}px) {
16
- flex-direction: row;
17
- flex-wrap: nowrap;
18
- overflow-x: visible;
19
- overflow-y: scroll;
20
- -webkit-overflow-scrolling: touch;
21
- scroll-snap-type: x mandatory;
22
- padding: 0.75rem 0.5rem;
23
- margin-left: 0.5rem;
24
-
25
- scrollbar-width: none;
26
- -ms-overflow-style: none;
27
- &::-webkit-scrollbar {
28
- display: none;
29
- }
30
- }
31
- `}
32
-
33
15
  // Mobile stack mode - vertical layout (only on mobile, below M breakpoint)
34
16
  ${({ isCarousel }) => !isCarousel && css`
35
17
  @media (max-width: ${breakpointValues.M - 1}px) {
@@ -38,7 +20,7 @@ const CardsContainer = styled.div`
38
20
  }
39
21
  `}
40
22
 
41
- // Desktop flexbox layout - 2 columns with centered wrap
23
+ // Non-mobile layout (M and above) - consistent across carousel/non-carousel, as above M we only do stacked mode.
42
24
  @media ${({ theme }) => theme.allBreakpoints('M')} {
43
25
  flex-direction: row;
44
26
  flex-wrap: wrap;
@@ -49,14 +31,49 @@ const CardsContainer = styled.div`
49
31
  margin: 0 auto;
50
32
  }
51
33
 
34
+ // Carousel mode - horizontal scroll container (M and below)
35
+ ${({ isCarousel }) => isCarousel && css`
36
+ @media (max-width: ${breakpointValues.L - 1}px) {
37
+ flex-direction: row;
38
+ flex-wrap: nowrap;
39
+ justify-content: flex-start;
40
+ width: 100%;
41
+ margin: 0;
42
+ max-width: 100%;
43
+ overflow-x: visible;
44
+ overflow-y: scroll;
45
+ -webkit-overflow-scrolling: touch;
46
+ scroll-snap-type: x mandatory;
47
+ padding: 0.75rem 1rem;
48
+
49
+ scrollbar-width: none;
50
+ -ms-overflow-style: none;
51
+ &::-webkit-scrollbar {
52
+ display: none;
53
+ }
54
+ }
55
+ `}
56
+
52
57
  // Desktop grid layout for XL breakpoint - 3 columns
53
58
  @media ${({ theme }) => theme.allBreakpoints('XL')} {
54
- display: grid;
55
- justify-content: center;
56
- grid-template-columns: ${({ columns }) => `repeat(${columns}, 1fr)`};
57
- width: ${({ columns }) => (columns === 2 ? 'fit-content' : '100%')};
58
- margin: ${({ columns }) => (columns === 2 ? '0 auto' : '0')};
59
- max-width: 100%;
59
+ ${({ columns }) => columns === 3 && css`
60
+ display: grid;
61
+ justify-content: center;
62
+ align-items: stretch;
63
+ grid-template-columns: repeat(3, minmax(0, 1fr));
64
+ width: 100%;
65
+ margin: 0 auto;
66
+ max-width: 100%;
67
+
68
+ /*
69
+ Above 1724px (3 * 564px which is the card max-width + 2 * 1rem), this is to stop the visible "gaps" growing
70
+ between the cards on really wide screens (so the only space between cards is the gap (1rem)).
71
+ */
72
+ @media (min-width: 1724px) {
73
+ grid-template-columns: repeat(3, 564px);
74
+ width: fit-content;
75
+ }
76
+ `}
60
77
  }
61
78
  `;
62
79
 
@@ -116,7 +133,7 @@ const CardLink = styled.a`
116
133
  position: relative;
117
134
  flex-direction: column;
118
135
  width: 100%;
119
- height: 100%;
136
+ flex: 1 1 auto;
120
137
  background: transparent;
121
138
  border-radius: 1rem;
122
139
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
@@ -164,24 +181,14 @@ const CardWrapper = styled.div`
164
181
  flex-direction: column;
165
182
  align-self: stretch;
166
183
 
167
- // Mobile carousel mode - cards at normal width in horizontal scroll (only on mobile, below M breakpoint)
184
+ // Carousel mode - cards at normal width in horizontal scroll (Medium and below)
168
185
  ${({ isCarousel }) => isCarousel && css`
169
- @media (max-width: ${breakpointValues.M - 1}px) {
186
+ @media (max-width: ${breakpointValues.L - 1}px) {
170
187
  scroll-snap-align: start;
171
188
  flex: 0 0 calc(100% - 1.5rem);
172
189
  min-width: calc(100% - 1.5rem);
173
190
  max-width: calc(100% - 1.5rem);
174
191
  flex-shrink: 0;
175
- margin-right: 0.5rem;
176
-
177
- &:first-child {
178
- padding-left: 0.5rem;
179
- }
180
-
181
- &:last-child {
182
- margin-right: 0;
183
- padding-right: 0.5rem;
184
- }
185
192
  }
186
193
  `}
187
194
 
@@ -193,10 +200,10 @@ const CardWrapper = styled.div`
193
200
  `}
194
201
 
195
202
  // Desktop M breakpoint - 2 columns layout
196
- @media ${({ theme }) => theme.allBreakpoints('M')} {
203
+ // - when isCarousel is true we only switch to "desktop" layout at L and above
204
+ @media ${({ theme, isCarousel }) => theme.allBreakpoints(isCarousel ? 'L' : 'M')} {
197
205
  flex-basis: calc(50% - 1rem);
198
206
  max-width: 564px;
199
- height: 100%;
200
207
  align-self: stretch;
201
208
  }
202
209
 
@@ -204,7 +211,6 @@ const CardWrapper = styled.div`
204
211
  @media ${({ theme }) => theme.allBreakpoints('XL')} {
205
212
  flex-basis: unset;
206
213
  max-width: 564px;
207
- height: 100%;
208
214
  align-self: stretch;
209
215
  }
210
216
  `;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Picture from '../../Atoms/Picture/Picture';
4
- import ArrowIcon from './ArrowIcon';
4
+ import ArrowIcon from './_ArrowIcon';
5
5
  import altCtaUnderline from '../../../theme/shared/assets/alt_cta_underline.svg';
6
6
  import {
7
7
  CardLink,
@@ -99,7 +99,9 @@ exports[`handles data structure correctly 1`] = `
99
99
  -ms-flex-direction: column;
100
100
  flex-direction: column;
101
101
  width: 100%;
102
- height: 100%;
102
+ -webkit-flex: 1 1 auto;
103
+ -ms-flex: 1 1 auto;
104
+ flex: 1 1 auto;
103
105
  background: transparent;
104
106
  border-radius: 1rem;
105
107
  box-shadow: 0 0 1rem rgba(0,0,0,0.15);
@@ -242,9 +244,13 @@ exports[`handles data structure correctly 1`] = `
242
244
  -webkit-justify-content: center;
243
245
  -ms-flex-pack: center;
244
246
  justify-content: center;
245
- grid-template-columns: repeat(3,1fr);
247
+ -webkit-align-items: stretch;
248
+ -webkit-box-align: stretch;
249
+ -ms-flex-align: stretch;
250
+ align-items: stretch;
251
+ grid-template-columns: repeat(3,minmax(0,1fr));
246
252
  width: 100%;
247
- margin: 0;
253
+ margin: 0 auto;
248
254
  max-width: 100%;
249
255
  }
250
256
  }
@@ -311,7 +317,6 @@ exports[`handles data structure correctly 1`] = `
311
317
  -ms-flex-preferred-size: calc(50% - 1rem);
312
318
  flex-basis: calc(50% - 1rem);
313
319
  max-width: 564px;
314
- height: 100%;
315
320
  -webkit-align-self: stretch;
316
321
  -ms-flex-item-align: stretch;
317
322
  align-self: stretch;
@@ -324,7 +329,6 @@ exports[`handles data structure correctly 1`] = `
324
329
  -ms-flex-preferred-size: unset;
325
330
  flex-basis: unset;
326
331
  max-width: 564px;
327
- height: 100%;
328
332
  -webkit-align-self: stretch;
329
333
  -ms-flex-item-align: stretch;
330
334
  align-self: stretch;
@@ -661,7 +665,9 @@ exports[`renders 2 columns layout correctly 1`] = `
661
665
  -ms-flex-direction: column;
662
666
  flex-direction: column;
663
667
  width: 100%;
664
- height: 100%;
668
+ -webkit-flex: 1 1 auto;
669
+ -ms-flex: 1 1 auto;
670
+ flex: 1 1 auto;
665
671
  background: transparent;
666
672
  border-radius: 1rem;
667
673
  box-shadow: 0 0 1rem rgba(0,0,0,0.15);
@@ -798,19 +804,7 @@ exports[`renders 2 columns layout correctly 1`] = `
798
804
  }
799
805
 
800
806
  @media (min-width:1440px) {
801
- .c0 {
802
- display: grid;
803
- -webkit-box-pack: center;
804
- -webkit-justify-content: center;
805
- -ms-flex-pack: center;
806
- justify-content: center;
807
- grid-template-columns: repeat(2,1fr);
808
- width: -webkit-fit-content;
809
- width: -moz-fit-content;
810
- width: fit-content;
811
- margin: 0 auto;
812
- max-width: 100%;
813
- }
807
+
814
808
  }
815
809
 
816
810
  @media (min-width:740px) {
@@ -875,7 +869,6 @@ exports[`renders 2 columns layout correctly 1`] = `
875
869
  -ms-flex-preferred-size: calc(50% - 1rem);
876
870
  flex-basis: calc(50% - 1rem);
877
871
  max-width: 564px;
878
- height: 100%;
879
872
  -webkit-align-self: stretch;
880
873
  -ms-flex-item-align: stretch;
881
874
  align-self: stretch;
@@ -888,7 +881,6 @@ exports[`renders 2 columns layout correctly 1`] = `
888
881
  -ms-flex-preferred-size: unset;
889
882
  flex-basis: unset;
890
883
  max-width: 564px;
891
- height: 100%;
892
884
  -webkit-align-self: stretch;
893
885
  -ms-flex-item-align: stretch;
894
886
  align-self: stretch;
@@ -1225,7 +1217,9 @@ exports[`renders carousel mode correctly 1`] = `
1225
1217
  -ms-flex-direction: column;
1226
1218
  flex-direction: column;
1227
1219
  width: 100%;
1228
- height: 100%;
1220
+ -webkit-flex: 1 1 auto;
1221
+ -ms-flex: 1 1 auto;
1222
+ flex: 1 1 auto;
1229
1223
  background: transparent;
1230
1224
  border-radius: 1rem;
1231
1225
  box-shadow: 0 0 1rem rgba(0,0,0,0.15);
@@ -1328,7 +1322,31 @@ exports[`renders carousel mode correctly 1`] = `
1328
1322
  }
1329
1323
  }
1330
1324
 
1331
- @media (max-width:739px) {
1325
+ @media (min-width:740px) {
1326
+ .c0 {
1327
+ -webkit-flex-direction: row;
1328
+ -ms-flex-direction: row;
1329
+ flex-direction: row;
1330
+ -webkit-flex-wrap: wrap;
1331
+ -ms-flex-wrap: wrap;
1332
+ flex-wrap: wrap;
1333
+ -webkit-box-pack: center;
1334
+ -webkit-justify-content: center;
1335
+ -ms-flex-pack: center;
1336
+ justify-content: center;
1337
+ -webkit-align-items: stretch;
1338
+ -webkit-box-align: stretch;
1339
+ -ms-flex-align: stretch;
1340
+ align-items: stretch;
1341
+ width: -webkit-fit-content;
1342
+ width: -moz-fit-content;
1343
+ width: fit-content;
1344
+ max-width: 100%;
1345
+ margin: 0 auto;
1346
+ }
1347
+ }
1348
+
1349
+ @media (max-width:1023px) {
1332
1350
  .c0 {
1333
1351
  -webkit-flex-direction: row;
1334
1352
  -ms-flex-direction: row;
@@ -1336,6 +1354,13 @@ exports[`renders carousel mode correctly 1`] = `
1336
1354
  -webkit-flex-wrap: nowrap;
1337
1355
  -ms-flex-wrap: nowrap;
1338
1356
  flex-wrap: nowrap;
1357
+ -webkit-box-pack: start;
1358
+ -webkit-justify-content: flex-start;
1359
+ -ms-flex-pack: start;
1360
+ justify-content: flex-start;
1361
+ width: 100%;
1362
+ margin: 0;
1363
+ max-width: 100%;
1339
1364
  overflow-x: visible;
1340
1365
  overflow-y: scroll;
1341
1366
  -webkit-overflow-scrolling: touch;
@@ -1343,8 +1368,7 @@ exports[`renders carousel mode correctly 1`] = `
1343
1368
  -moz-scroll-snap-type: x mandatory;
1344
1369
  -ms-scroll-snap-type: x mandatory;
1345
1370
  scroll-snap-type: x mandatory;
1346
- padding: 0.75rem 0.5rem;
1347
- margin-left: 0.5rem;
1371
+ padding: 0.75rem 1rem;
1348
1372
  -webkit-scrollbar-width: none;
1349
1373
  -moz-scrollbar-width: none;
1350
1374
  -ms-scrollbar-width: none;
@@ -1357,14 +1381,9 @@ exports[`renders carousel mode correctly 1`] = `
1357
1381
  }
1358
1382
  }
1359
1383
 
1360
- @media (min-width:740px) {
1384
+ @media (min-width:1440px) {
1361
1385
  .c0 {
1362
- -webkit-flex-direction: row;
1363
- -ms-flex-direction: row;
1364
- flex-direction: row;
1365
- -webkit-flex-wrap: wrap;
1366
- -ms-flex-wrap: wrap;
1367
- flex-wrap: wrap;
1386
+ display: grid;
1368
1387
  -webkit-box-pack: center;
1369
1388
  -webkit-justify-content: center;
1370
1389
  -ms-flex-pack: center;
@@ -1373,24 +1392,9 @@ exports[`renders carousel mode correctly 1`] = `
1373
1392
  -webkit-box-align: stretch;
1374
1393
  -ms-flex-align: stretch;
1375
1394
  align-items: stretch;
1376
- width: -webkit-fit-content;
1377
- width: -moz-fit-content;
1378
- width: fit-content;
1379
- max-width: 100%;
1380
- margin: 0 auto;
1381
- }
1382
- }
1383
-
1384
- @media (min-width:1440px) {
1385
- .c0 {
1386
- display: grid;
1387
- -webkit-box-pack: center;
1388
- -webkit-justify-content: center;
1389
- -ms-flex-pack: center;
1390
- justify-content: center;
1391
- grid-template-columns: repeat(3,1fr);
1395
+ grid-template-columns: repeat(3,minmax(0,1fr));
1392
1396
  width: 100%;
1393
- margin: 0;
1397
+ margin: 0 auto;
1394
1398
  max-width: 100%;
1395
1399
  }
1396
1400
  }
@@ -1445,7 +1449,7 @@ exports[`renders carousel mode correctly 1`] = `
1445
1449
  }
1446
1450
  }
1447
1451
 
1448
- @media (max-width:739px) {
1452
+ @media (max-width:1023px) {
1449
1453
  .c1 {
1450
1454
  -webkit-scroll-snap-align: start;
1451
1455
  -moz-scroll-snap-align: start;
@@ -1459,26 +1463,15 @@ exports[`renders carousel mode correctly 1`] = `
1459
1463
  -webkit-flex-shrink: 0;
1460
1464
  -ms-flex-negative: 0;
1461
1465
  flex-shrink: 0;
1462
- margin-right: 0.5rem;
1463
- }
1464
-
1465
- .c1:first-child {
1466
- padding-left: 0.5rem;
1467
- }
1468
-
1469
- .c1:last-child {
1470
- margin-right: 0;
1471
- padding-right: 0.5rem;
1472
1466
  }
1473
1467
  }
1474
1468
 
1475
- @media (min-width:740px) {
1469
+ @media (min-width:1024px) {
1476
1470
  .c1 {
1477
1471
  -webkit-flex-basis: calc(50% - 1rem);
1478
1472
  -ms-flex-preferred-size: calc(50% - 1rem);
1479
1473
  flex-basis: calc(50% - 1rem);
1480
1474
  max-width: 564px;
1481
- height: 100%;
1482
1475
  -webkit-align-self: stretch;
1483
1476
  -ms-flex-item-align: stretch;
1484
1477
  align-self: stretch;
@@ -1491,7 +1484,6 @@ exports[`renders carousel mode correctly 1`] = `
1491
1484
  -ms-flex-preferred-size: unset;
1492
1485
  flex-basis: unset;
1493
1486
  max-width: 564px;
1494
- height: 100%;
1495
1487
  -webkit-align-self: stretch;
1496
1488
  -ms-flex-item-align: stretch;
1497
1489
  align-self: stretch;
@@ -1828,7 +1820,9 @@ exports[`renders correctly with data prop 1`] = `
1828
1820
  -ms-flex-direction: column;
1829
1821
  flex-direction: column;
1830
1822
  width: 100%;
1831
- height: 100%;
1823
+ -webkit-flex: 1 1 auto;
1824
+ -ms-flex: 1 1 auto;
1825
+ flex: 1 1 auto;
1832
1826
  background: transparent;
1833
1827
  border-radius: 1rem;
1834
1828
  box-shadow: 0 0 1rem rgba(0,0,0,0.15);
@@ -1971,9 +1965,13 @@ exports[`renders correctly with data prop 1`] = `
1971
1965
  -webkit-justify-content: center;
1972
1966
  -ms-flex-pack: center;
1973
1967
  justify-content: center;
1974
- grid-template-columns: repeat(3,1fr);
1968
+ -webkit-align-items: stretch;
1969
+ -webkit-box-align: stretch;
1970
+ -ms-flex-align: stretch;
1971
+ align-items: stretch;
1972
+ grid-template-columns: repeat(3,minmax(0,1fr));
1975
1973
  width: 100%;
1976
- margin: 0;
1974
+ margin: 0 auto;
1977
1975
  max-width: 100%;
1978
1976
  }
1979
1977
  }
@@ -2040,7 +2038,6 @@ exports[`renders correctly with data prop 1`] = `
2040
2038
  -ms-flex-preferred-size: calc(50% - 1rem);
2041
2039
  flex-basis: calc(50% - 1rem);
2042
2040
  max-width: 564px;
2043
- height: 100%;
2044
2041
  -webkit-align-self: stretch;
2045
2042
  -ms-flex-item-align: stretch;
2046
2043
  align-self: stretch;
@@ -2053,7 +2050,6 @@ exports[`renders correctly with data prop 1`] = `
2053
2050
  -ms-flex-preferred-size: unset;
2054
2051
  flex-basis: unset;
2055
2052
  max-width: 564px;
2056
- height: 100%;
2057
2053
  -webkit-align-self: stretch;
2058
2054
  -ms-flex-item-align: stretch;
2059
2055
  align-self: stretch;
@@ -7,6 +7,7 @@ import { Wrapper, Digits } from './Countdown.style';
7
7
  const Countdown = ({
8
8
  endDate, color = 'black', endMessage = null, introMessage = null
9
9
  }) => {
10
+ const [thisEndDate, setThisEndDate] = useState(null);
10
11
  const [countdownHasEnded, setCountdownHasEnded] = useState(false);
11
12
  const [countdownTime, setCountdownTime] = useState({
12
13
  days: '00',
@@ -15,12 +16,15 @@ const Countdown = ({
15
16
  seconds: '00'
16
17
  });
17
18
 
18
- const countDownDate = moment(endDate);
19
+ useEffect(() => {
20
+ const isoEndDate = new Date(endDate).toISOString();
21
+ setThisEndDate(moment(isoEndDate));
22
+ }, [endDate]);
19
23
 
20
24
  useEffect(() => {
21
25
  const interval = setInterval(() => {
22
26
  const now = moment();
23
- const timeRemaining = moment(countDownDate - now);
27
+ const timeRemaining = moment(thisEndDate - now);
24
28
 
25
29
  const days = timeRemaining.format('DDD');
26
30
  const hours = timeRemaining.format('HH');
@@ -34,14 +38,17 @@ const Countdown = ({
34
38
  seconds
35
39
  });
36
40
 
37
- if (countDownDate.diff(now, 'seconds') < 1) {
41
+ if (thisEndDate.diff(now, 'seconds') < 1) {
42
+ clearInterval(interval);
38
43
  setCountdownHasEnded(true);
39
44
  }
40
45
  }, 1000);
41
46
  return () => clearInterval(interval);
42
- }, [countDownDate]);
47
+ }, [thisEndDate]);
43
48
 
44
- if (countdownHasEnded) return endMessage;
49
+ if (countdownHasEnded) {
50
+ return endMessage;
51
+ }
45
52
 
46
53
  return (
47
54
  <>
@@ -5,5 +5,5 @@ import Text from '../../Atoms/Text/Text';
5
5
  const intro = <Text tag="h2" size="xl">Hello</Text>;
6
6
  const end = <Text tag="h2" size="xl">Bye</Text>;
7
7
 
8
- <Countdown endDate="Jan 22, 2021 24:00:00" endMessage={end} introMessage={intro}/>
8
+ <Countdown endDate="Jan 16, 2026 10:30:00" endMessage={end} introMessage={intro}/>
9
9
  ```
@@ -77,10 +77,11 @@ const MainNav = ({ navItems = {} }) => {
77
77
 
78
78
  /* Determine which field represents our url path */
79
79
  let thisUrl = NavHelper(thisFirstChild);
80
- const relNoopener = !allowListed(thisUrl) && 'noopener';
80
+ const relNoopener = !allowListed(thisUrl) ? 'noopener' : 'false';
81
81
  const hasSubMenu = group.links && group.links.length > 1;
82
82
  const hasPopUp = hasSubMenu ? 'true' : null;
83
83
  thisUrl = InternalLinkHelper(thisUrl);
84
+
84
85
  return (
85
86
  <NavItem
86
87
  role="none"