@comicrelief/component-library 8.47.0 → 8.47.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.
@@ -60,7 +60,8 @@ const HeroBanner = _ref => {
60
60
  return /*#__PURE__*/_react.default.createElement(_HeroBanner.Container, {
61
61
  pageBackgroundColour: pageBackgroundColour,
62
62
  paddingTop: paddingTop,
63
- paddingBottom: paddingBottom
63
+ paddingBottom: paddingBottom,
64
+ variant: variant
64
65
  }, /*#__PURE__*/_react.default.createElement(_HeroBanner.OuterWrapper, {
65
66
  variant: variant,
66
67
  textBannerCopyBackgroundColour: textBannerCopyBackgroundColour
@@ -16,6 +16,7 @@ import variants from './_variants';
16
16
  imageAltText="Image alt text"
17
17
  variant={variants.FULL_HEIGHT}
18
18
  copyLeft
19
+ paddingTop="2rem"
19
20
  >
20
21
  <Text tag="h1">
21
22
  Full Height: Copy Left
@@ -38,7 +39,7 @@ import variants from './_variants';
38
39
  paddingTop="2rem"
39
40
  >
40
41
  <Text tag="h1">
41
- Full Height: Additional Top Padding, Copy Right w/CTA, Same Tab
42
+ Full Height: Copy Right w/CTA, Same Tab
42
43
  </Text>
43
44
  <Text tag="p">
44
45
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
@@ -56,6 +57,7 @@ import variants from './_variants';
56
57
  ctaUrl="http://www.comicrelief.com/register"
57
58
  ctaNewTab
58
59
  copyLeft
60
+ paddingTop="2rem"
59
61
  >
60
62
  <Text tag="h1">
61
63
  Full Height: Copy Left w/CTA, New Tab
@@ -65,6 +67,28 @@ import variants from './_variants';
65
67
  </Text>
66
68
  </HeroBanner>
67
69
 
70
+ <HeroBanner
71
+ pageBackgroundColour="teal_light"
72
+ imageSet={defaultData.heroBannerImage}
73
+ image={defaultData.heroBannerImage}
74
+ imageLow={defaultData.heroBannerImage}
75
+ imageAltText="Image alt text"
76
+ variant={variants.FULL_HEIGHT}
77
+ ctaText="Register to fundraise but longer"
78
+ ctaUrl="http://www.comicrelief.com/register"
79
+ ctaNewTab
80
+ copyLeft
81
+ paddingBottom="0"
82
+ paddingTop="0"
83
+ >
84
+ <Text tag="h1">
85
+ Full Height: ZERO padding
86
+ </Text>
87
+ <Text tag="p">
88
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
89
+ </Text>
90
+ </HeroBanner>
91
+
68
92
  <HeroBanner
69
93
  pageBackgroundColour="blue_dark"
70
94
  imageSet={defaultData.heroBannerImage}
@@ -74,7 +98,7 @@ import variants from './_variants';
74
98
  copyLeft={false}
75
99
  >
76
100
  <Text tag="h1">
77
- Full Height: Copy Right (default variant prop value)
101
+ Full Height: Copy Right (default variant and padding prop values)
78
102
  </Text>
79
103
  <Text tag="p">
80
104
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
@@ -88,6 +112,7 @@ import variants from './_variants';
88
112
  imageLow={defaultData.heroBannerImage}
89
113
  imageAltText="Image alt text"
90
114
  variant={variants.HALF_HEIGHT}
115
+ paddingTop="2rem"
91
116
  >
92
117
  <Text tag="h1">
93
118
  Half Height: min height
@@ -120,13 +145,13 @@ import variants from './_variants';
120
145
  </HeroBanner>
121
146
 
122
147
  <HeroBanner
123
- pageBackgroundColour="grey_light"
148
+ pageBackgroundColour="grey"
124
149
  textBannerCopyBackgroundColour="deep_violet"
125
150
  variant={variants.TEXT_BANNER}
126
151
  copyColour="white"
127
152
  >
128
153
  <Text tag="h1">
129
- Responsive Text Banner
154
+ Responsive Text Banner, default padding
130
155
  </Text>
131
156
  <Text tag="p">
132
157
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
@@ -134,7 +159,7 @@ import variants from './_variants';
134
159
  </HeroBanner>
135
160
 
136
161
  <HeroBanner
137
- pageBackgroundColour="grey_light"
162
+ pageBackgroundColour="grey"
138
163
  textBannerCopyBackgroundColour="deep_violet"
139
164
  variant={variants.TEXT_BANNER}
140
165
  ctaUrl="http://www.comicrelief.com/register"
@@ -152,15 +177,17 @@ import variants from './_variants';
152
177
  </HeroBanner>
153
178
 
154
179
  <HeroBanner
155
- pageBackgroundColour="grey_light"
180
+ pageBackgroundColour="grey"
156
181
  textBannerCopyBackgroundColour="blue_light"
157
182
  variant={variants.TEXT_BANNER}
158
183
  textBannerCtaColour="red"
159
184
  ctaText="Register"
160
185
  ctaUrl="http://www.comicrelief.com/register"
186
+ paddingTop="2rem"
187
+ paddingBotton="2rem"
161
188
  >
162
189
  <Text tag="h1">
163
- Responsive Text w/CTA, Same Tab
190
+ Responsive Text w/CTA, Same Tab, 2rem padding top and bottom
164
191
  </Text>
165
192
  <Text tag="p">
166
193
  Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
@@ -31,7 +31,7 @@ const handleVariant = variant => {
31
31
  const Container = exports.Container = _styledComponents.default.div.withConfig({
32
32
  displayName: "HeroBannerstyle__Container",
33
33
  componentId: "sc-2ch4eo-0"
34
- })(["width:100%;height:auto;display:flex;position:relative;flex-direction:column;background:", ";justify-content:center;@media ", "{", " align-items:center;}"], _ref => {
34
+ })(["width:100%;height:auto;display:flex;position:relative;flex-direction:column;background:", ";justify-content:center;", ";@media ", "{", " align-items:center;}"], _ref => {
35
35
  let {
36
36
  theme,
37
37
  pageBackgroundColour
@@ -39,168 +39,185 @@ const Container = exports.Container = _styledComponents.default.div.withConfig({
39
39
  return theme.color(pageBackgroundColour);
40
40
  }, _ref2 => {
41
41
  let {
42
- theme
42
+ variant,
43
+ paddingTop,
44
+ paddingBottom
43
45
  } = _ref2;
46
+ return variant === _variants.default.TEXT_BANNER && (0, _styledComponents.css)(["padding:", " 1rem ", ";@media ", "{padding-left:2rem;padding-right:2rem;}"], paddingTop, paddingBottom, _ref3 => {
47
+ let {
48
+ theme
49
+ } = _ref3;
50
+ return theme.breakpoints2026('M');
51
+ });
52
+ }, _ref4 => {
53
+ let {
54
+ theme
55
+ } = _ref4;
44
56
  return theme.breakpoints2026('L');
45
- }, _ref3 => {
57
+ }, _ref5 => {
46
58
  let {
47
59
  paddingTop,
48
60
  paddingBottom
49
- } = _ref3;
61
+ } = _ref5;
50
62
  return (0, _styledComponents.css)(["padding:", " 2rem ", ";"], paddingTop, paddingBottom);
51
63
  });
52
64
  const OuterWrapper = exports.OuterWrapper = _styledComponents.default.div.withConfig({
53
65
  displayName: "HeroBannerstyle__OuterWrapper",
54
66
  componentId: "sc-2ch4eo-1"
55
- })(["width:100%;max-width:none;position:relative;display:flex;flex-direction:column;align-items:center;@media ", "{width:100%;max-width:1500px;border-radius:1rem;overflow:hidden;", ""], _ref4 => {
67
+ })(["width:100%;max-width:none;position:relative;display:flex;flex-direction:column;align-items:center;@media ", "{width:100%;max-width:1500px;border-radius:1rem;overflow:hidden;", ""], _ref6 => {
56
68
  let {
57
69
  theme
58
- } = _ref4;
70
+ } = _ref6;
59
71
  return theme.breakpoints2026('L');
60
- }, _ref5 => {
72
+ }, _ref7 => {
61
73
  let {
62
74
  variant
63
- } = _ref5;
75
+ } = _ref7;
64
76
  return variant && (0, _styledComponents.css)(["", ""], handleVariant(variant));
65
77
  });
66
78
  const MediaWrapper = exports.MediaWrapper = _styledComponents.default.div.withConfig({
67
79
  displayName: "HeroBannerstyle__MediaWrapper",
68
80
  componentId: "sc-2ch4eo-2"
69
- })(["width:100%;height:100%;@media ", "{position:absolute;top:0;left:0;img{object-position:top center;height:100%;transform:scale(1.02);transition:transform ", "s cubic-bezier(0.68,", ",0.265,", ");", ";}&:has(+ div a:hover){> div > img{transform:scale(1.04);}}}"], _ref6 => {
81
+ })(["width:100%;height:100%;@media ", "{position:absolute;top:0;left:0;img{object-position:top center;height:100%;transform:scale(1.02);transition:transform ", "s cubic-bezier(0.68,", ",0.265,", ");", ";}&:has(+ div a:hover){> div > img{transform:scale(1.04);}}}"], _ref8 => {
70
82
  let {
71
83
  theme
72
- } = _ref6;
84
+ } = _ref8;
73
85
  return theme.breakpoints2026('L');
74
- }, 0.4, -1.15, 2.35, _ref7 => {
86
+ }, 0.4, -1.15, 2.35, _ref9 => {
75
87
  let {
76
88
  variant
77
- } = _ref7;
89
+ } = _ref9;
78
90
  return variant === _variants.default.HALF_HEIGHT && 'min-height: 450px;';
79
91
  });
80
92
  const CopyOuterWrapper = exports.CopyOuterWrapper = _styledComponents.default.div.withConfig({
81
93
  displayName: "HeroBannerstyle__CopyOuterWrapper",
82
94
  componentId: "sc-2ch4eo-3"
83
- })(["position:relative;height:100%;left:0;right:0;display:flex;width:calc(100% - (2 * 1rem));", " @media ", "{width:calc(100% - 4rem);}@media ", "{position:relative;top:auto;left:auto;height:100%;width:100%;", " display:flex;align-items:center;margin:0 auto;justify-content:", ";", "}"], _ref8 => {
95
+ })(["position:relative;height:100%;left:0;right:0;display:flex;width:calc(100% - (2 * 1rem));", " @media ", "{", "}@media ", "{position:relative;top:auto;left:auto;height:100%;width:100%;", " display:flex;align-items:center;margin:0 auto;justify-content:", ";", "}"], _ref10 => {
84
96
  let {
85
97
  variant
86
- } = _ref8;
87
- return variant !== _variants.default.TEXT_BANNER ? 'margin: -2rem 1rem 2rem;' : 'margin: 2rem 1rem;';
88
- }, _ref9 => {
98
+ } = _ref10;
99
+ return variant !== _variants.default.TEXT_BANNER ? 'margin: -2rem 1rem 2rem;' : 'margin: 0; width: 100%;';
100
+ }, _ref11 => {
89
101
  let {
90
102
  theme
91
- } = _ref9;
103
+ } = _ref11;
92
104
  return theme.breakpoints2026('M');
93
- }, _ref10 => {
105
+ }, _ref12 => {
106
+ let {
107
+ variant
108
+ } = _ref12;
109
+ return variant !== _variants.default.TEXT_BANNER ? 'margin: -2rem 2rem 2rem; width: calc(100% - (2 * 2rem));' : 'margin: 0; width: 100%;';
110
+ }, _ref13 => {
94
111
  let {
95
112
  theme
96
- } = _ref10;
113
+ } = _ref13;
97
114
  return theme.breakpoints2026('L');
98
- }, _ref11 => {
115
+ }, _ref14 => {
99
116
  let {
100
117
  variant
101
- } = _ref11;
118
+ } = _ref14;
102
119
  return variant !== _variants.default.TEXT_BANNER && 'max-width: 1200px;';
103
- }, _ref12 => {
120
+ }, _ref15 => {
104
121
  let {
105
122
  variant,
106
123
  copyLeft
107
- } = _ref12;
124
+ } = _ref15;
108
125
  if (variant === _variants.default.TEXT_BANNER) return 'center';
109
126
  return copyLeft ? 'flex-start' : 'flex-end';
110
- }, _ref13 => {
127
+ }, _ref16 => {
111
128
  let {
112
129
  variant
113
- } = _ref13;
130
+ } = _ref16;
114
131
  return variant && (0, _styledComponents.css)(["", ""], handleVariant(variant));
115
132
  });
116
133
  const Copy = exports.Copy = _styledComponents.default.div.withConfig({
117
134
  displayName: "HeroBannerstyle__Copy",
118
135
  componentId: "sc-2ch4eo-4"
119
- })(["width:100%;", ";border-radius:1rem;padding:", ";color:", ";background-color:", ";", ";", ";@media ", "{width:", ";}"], (0, _zIndex.default)('low'), _ref14 => {
136
+ })(["width:100%;", ";border-radius:1rem;padding:", ";color:", ";background-color:", ";", ";", ";@media ", "{width:", ";}"], (0, _zIndex.default)('low'), _ref17 => {
120
137
  let {
121
138
  variant
122
- } = _ref14;
139
+ } = _ref17;
123
140
  return variant === _variants.default.TEXT_BANNER ? '3rem 1.5rem' : '1.5rem';
124
- }, _ref15 => {
141
+ }, _ref18 => {
125
142
  let {
126
143
  theme,
127
144
  copyColour
128
- } = _ref15;
145
+ } = _ref18;
129
146
  return theme.color(copyColour);
130
- }, _ref16 => {
147
+ }, _ref19 => {
131
148
  let {
132
149
  theme,
133
150
  variant,
134
151
  textBannerCopyBackgroundColour
135
- } = _ref16;
152
+ } = _ref19;
136
153
  return variant === _variants.default.TEXT_BANNER ? theme.color(textBannerCopyBackgroundColour) : theme.color('white');
137
- }, _ref17 => {
154
+ }, _ref20 => {
138
155
  let {
139
156
  variant,
140
157
  theme
141
- } = _ref17;
158
+ } = _ref20;
142
159
  return variant !== _variants.default.TEXT_BANNER && `
143
160
  @media ${theme.breakpoints2026('L')} {
144
161
  padding: 2rem 2rem 1.75rem;
145
162
  }
146
163
  `;
147
- }, _ref18 => {
164
+ }, _ref21 => {
148
165
  let {
149
166
  variant,
150
167
  theme
151
- } = _ref18;
168
+ } = _ref21;
152
169
  return variant === _variants.default.TEXT_BANNER && `
153
170
  text-align: center;
154
171
  @media ${theme.breakpoints2026('M')} {
155
172
  padding: 4rem 11%;
156
173
  }
157
174
  `;
158
- }, _ref19 => {
175
+ }, _ref22 => {
159
176
  let {
160
177
  theme
161
- } = _ref19;
178
+ } = _ref22;
162
179
  return theme.breakpoints2026('L');
163
- }, _ref20 => {
180
+ }, _ref23 => {
164
181
  let {
165
182
  variant
166
- } = _ref20;
183
+ } = _ref23;
167
184
  return variant !== _variants.default.TEXT_BANNER ? '92%' : '100%';
168
185
  });
169
186
  const CopyInnerWrapper = exports.CopyInnerWrapper = _styledComponents.default.div.withConfig({
170
187
  displayName: "HeroBannerstyle__CopyInnerWrapper",
171
188
  componentId: "sc-2ch4eo-5"
172
- })(["width:100%;height:100%;display:flex;align-items:center;@media ", "{height:auto;", ";", ";justify-content:", ";}"], _ref21 => {
189
+ })(["width:100%;height:100%;display:flex;align-items:center;@media ", "{height:auto;", ";", ";justify-content:", ";}"], _ref24 => {
173
190
  let {
174
191
  theme
175
- } = _ref21;
192
+ } = _ref24;
176
193
  return theme.breakpoints2026('L');
177
- }, _ref22 => {
194
+ }, _ref25 => {
178
195
  let {
179
196
  variant
180
- } = _ref22;
197
+ } = _ref25;
181
198
  return variant === _variants.default.TEXT_BANNER ? (0, _styledComponents.css)(["width:100%;"]) : (0, _styledComponents.css)(["width:50%;"]);
182
- }, _ref23 => {
199
+ }, _ref26 => {
183
200
  let {
184
201
  variant
185
- } = _ref23;
202
+ } = _ref26;
186
203
  return variant === _variants.default.TEXT_BANNER ? (0, _styledComponents.css)(["margin:0;"]) : (0, _styledComponents.css)(["margin:2rem 0;"]);
187
- }, _ref24 => {
204
+ }, _ref27 => {
188
205
  let {
189
206
  copyLeft
190
- } = _ref24;
207
+ } = _ref27;
191
208
  return copyLeft ? (0, _styledComponents.css)([" flex-end;"]) : (0, _styledComponents.css)([" flex-start;"]);
192
209
  });
193
210
  const CTAWrapper = exports.CTAWrapper = _styledComponents.default.div.withConfig({
194
211
  displayName: "HeroBannerstyle__CTAWrapper",
195
212
  componentId: "sc-2ch4eo-6"
196
- })(["width:100%;height:auto;position:relative;padding:0.5rem 0;margin-top:1.25rem;", ""], _ref25 => {
213
+ })(["width:100%;height:auto;position:relative;padding:0.5rem 0;margin-top:1.25rem;", ""], _ref28 => {
197
214
  let {
198
215
  variant
199
- } = _ref25;
200
- return variant !== _variants.default.TEXT_BANNER && (0, _styledComponents.css)(["span{font-weight:bold;color:", ";}"], _ref26 => {
216
+ } = _ref28;
217
+ return variant !== _variants.default.TEXT_BANNER && (0, _styledComponents.css)(["span{font-weight:bold;color:", ";}"], _ref29 => {
201
218
  let {
202
219
  theme
203
- } = _ref26;
220
+ } = _ref29;
204
221
  return theme.color('red');
205
222
  });
206
223
  });
@@ -219,14 +236,14 @@ const CtaTextUnderline = exports.CtaTextUnderline = _styledComponents.default.im
219
236
  const HeroBannerLink = exports.HeroBannerLink = _styledComponents.default.a.withConfig({
220
237
  displayName: "HeroBannerstyle__HeroBannerLink",
221
238
  componentId: "sc-2ch4eo-10"
222
- })(["text-decoration:none;@media ", "{", " width:", ";> div{width:100%;}&:hover{img.cta-text-underline{opacity:1;}}}"], _ref27 => {
239
+ })(["text-decoration:none;width:100%;@media ", "{", " width:", ";> div{width:100%;}&:hover{img.cta-text-underline{opacity:1;}}}"], _ref30 => {
223
240
  let {
224
241
  theme
225
- } = _ref27;
242
+ } = _ref30;
226
243
  return theme.breakpoints2026('L');
227
- }, (0, _animations.bounceUpAnimation)(true, 10, 2), _ref28 => {
244
+ }, (0, _animations.bounceUpAnimation)(true, 10, 2), _ref31 => {
228
245
  let {
229
246
  variant
230
- } = _ref28;
247
+ } = _ref31;
231
248
  return variant !== _variants.default.TEXT_BANNER ? '92%' : '100%';
232
249
  });
@@ -209,7 +209,8 @@ exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
209
209
 
210
210
  @media (min-width:740px) {
211
211
  .c5 {
212
- width: calc(100% - 4rem);
212
+ margin: -2rem 2rem 2rem;
213
+ width: calc(100% - (2 * 2rem));
213
214
  }
214
215
  }
215
216
 
@@ -527,7 +528,8 @@ exports[`renders "Half Height Media" Hero Banner correctly 1`] = `
527
528
 
528
529
  @media (min-width:740px) {
529
530
  .c5 {
530
- width: calc(100% - 4rem);
531
+ margin: -2rem 2rem 2rem;
532
+ width: calc(100% - (2 * 2rem));
531
533
  }
532
534
  }
533
535
 
@@ -694,6 +696,7 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
694
696
  -webkit-justify-content: center;
695
697
  -ms-flex-pack: center;
696
698
  justify-content: center;
699
+ padding: 0rem 1rem 2rem;
697
700
  }
698
701
 
699
702
  .c1 {
@@ -723,7 +726,8 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
723
726
  display: -ms-flexbox;
724
727
  display: flex;
725
728
  width: calc(100% - (2 * 1rem));
726
- margin: 2rem 1rem;
729
+ margin: 0;
730
+ width: 100%;
727
731
  }
728
732
 
729
733
  .c4 {
@@ -777,6 +781,13 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
777
781
  }
778
782
  }
779
783
 
784
+ @media (min-width:740px) {
785
+ .c0 {
786
+ padding-left: 2rem;
787
+ padding-right: 2rem;
788
+ }
789
+ }
790
+
780
791
  @media (min-width:1024px) {
781
792
  .c0 {
782
793
  padding: 0rem 2rem 2rem;
@@ -798,7 +809,8 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
798
809
 
799
810
  @media (min-width:740px) {
800
811
  .c2 {
801
- width: calc(100% - 4rem);
812
+ margin: 0;
813
+ width: 100%;
802
814
  }
803
815
  }
804
816
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "8.47.0",
4
+ "version": "8.47.2",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -88,6 +88,7 @@ const HeroBanner = ({
88
88
  pageBackgroundColour={pageBackgroundColour}
89
89
  paddingTop={paddingTop}
90
90
  paddingBottom={paddingBottom}
91
+ variant={variant}
91
92
  >
92
93
 
93
94
  <OuterWrapper
@@ -16,6 +16,7 @@ import variants from './_variants';
16
16
  imageAltText="Image alt text"
17
17
  variant={variants.FULL_HEIGHT}
18
18
  copyLeft
19
+ paddingTop="2rem"
19
20
  >
20
21
  <Text tag="h1">
21
22
  Full Height: Copy Left
@@ -38,7 +39,7 @@ import variants from './_variants';
38
39
  paddingTop="2rem"
39
40
  >
40
41
  <Text tag="h1">
41
- Full Height: Additional Top Padding, Copy Right w/CTA, Same Tab
42
+ Full Height: Copy Right w/CTA, Same Tab
42
43
  </Text>
43
44
  <Text tag="p">
44
45
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
@@ -56,6 +57,7 @@ import variants from './_variants';
56
57
  ctaUrl="http://www.comicrelief.com/register"
57
58
  ctaNewTab
58
59
  copyLeft
60
+ paddingTop="2rem"
59
61
  >
60
62
  <Text tag="h1">
61
63
  Full Height: Copy Left w/CTA, New Tab
@@ -65,6 +67,28 @@ import variants from './_variants';
65
67
  </Text>
66
68
  </HeroBanner>
67
69
 
70
+ <HeroBanner
71
+ pageBackgroundColour="teal_light"
72
+ imageSet={defaultData.heroBannerImage}
73
+ image={defaultData.heroBannerImage}
74
+ imageLow={defaultData.heroBannerImage}
75
+ imageAltText="Image alt text"
76
+ variant={variants.FULL_HEIGHT}
77
+ ctaText="Register to fundraise but longer"
78
+ ctaUrl="http://www.comicrelief.com/register"
79
+ ctaNewTab
80
+ copyLeft
81
+ paddingBottom="0"
82
+ paddingTop="0"
83
+ >
84
+ <Text tag="h1">
85
+ Full Height: ZERO padding
86
+ </Text>
87
+ <Text tag="p">
88
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
89
+ </Text>
90
+ </HeroBanner>
91
+
68
92
  <HeroBanner
69
93
  pageBackgroundColour="blue_dark"
70
94
  imageSet={defaultData.heroBannerImage}
@@ -74,7 +98,7 @@ import variants from './_variants';
74
98
  copyLeft={false}
75
99
  >
76
100
  <Text tag="h1">
77
- Full Height: Copy Right (default variant prop value)
101
+ Full Height: Copy Right (default variant and padding prop values)
78
102
  </Text>
79
103
  <Text tag="p">
80
104
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
@@ -88,6 +112,7 @@ import variants from './_variants';
88
112
  imageLow={defaultData.heroBannerImage}
89
113
  imageAltText="Image alt text"
90
114
  variant={variants.HALF_HEIGHT}
115
+ paddingTop="2rem"
91
116
  >
92
117
  <Text tag="h1">
93
118
  Half Height: min height
@@ -120,13 +145,13 @@ import variants from './_variants';
120
145
  </HeroBanner>
121
146
 
122
147
  <HeroBanner
123
- pageBackgroundColour="grey_light"
148
+ pageBackgroundColour="grey"
124
149
  textBannerCopyBackgroundColour="deep_violet"
125
150
  variant={variants.TEXT_BANNER}
126
151
  copyColour="white"
127
152
  >
128
153
  <Text tag="h1">
129
- Responsive Text Banner
154
+ Responsive Text Banner, default padding
130
155
  </Text>
131
156
  <Text tag="p">
132
157
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
@@ -134,7 +159,7 @@ import variants from './_variants';
134
159
  </HeroBanner>
135
160
 
136
161
  <HeroBanner
137
- pageBackgroundColour="grey_light"
162
+ pageBackgroundColour="grey"
138
163
  textBannerCopyBackgroundColour="deep_violet"
139
164
  variant={variants.TEXT_BANNER}
140
165
  ctaUrl="http://www.comicrelief.com/register"
@@ -152,15 +177,17 @@ import variants from './_variants';
152
177
  </HeroBanner>
153
178
 
154
179
  <HeroBanner
155
- pageBackgroundColour="grey_light"
180
+ pageBackgroundColour="grey"
156
181
  textBannerCopyBackgroundColour="blue_light"
157
182
  variant={variants.TEXT_BANNER}
158
183
  textBannerCtaColour="red"
159
184
  ctaText="Register"
160
185
  ctaUrl="http://www.comicrelief.com/register"
186
+ paddingTop="2rem"
187
+ paddingBotton="2rem"
161
188
  >
162
189
  <Text tag="h1">
163
- Responsive Text w/CTA, Same Tab
190
+ Responsive Text w/CTA, Same Tab, 2rem padding top and bottom
164
191
  </Text>
165
192
  <Text tag="p">
166
193
  Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.
@@ -31,6 +31,14 @@ const Container = styled.div`
31
31
  background: ${({ theme, pageBackgroundColour }) => theme.color(pageBackgroundColour)};
32
32
  justify-content: center;
33
33
 
34
+ ${({ variant, paddingTop, paddingBottom }) => (variant === variants.TEXT_BANNER && css`
35
+ padding: ${paddingTop} 1rem ${paddingBottom};
36
+
37
+ @media ${({ theme }) => theme.breakpoints2026('M')} {
38
+ padding-left: 2rem; padding-right: 2rem;
39
+ }
40
+ `)};
41
+
34
42
  @media ${({ theme }) => theme.breakpoints2026('L')} {
35
43
  ${({ paddingTop, paddingBottom }) => css`padding: ${paddingTop} 2rem ${paddingBottom};`}
36
44
  align-items: center;
@@ -91,11 +99,13 @@ const CopyOuterWrapper = styled.div`
91
99
  right: 0;
92
100
  display: flex;
93
101
  width: calc(100% - (2 * 1rem));
94
-
95
- ${({ variant }) => (variant !== variants.TEXT_BANNER ? 'margin: -2rem 1rem 2rem;' : 'margin: 2rem 1rem;')}
102
+
103
+ ${({ variant }) => (variant !== variants.TEXT_BANNER ? 'margin: -2rem 1rem 2rem;' : 'margin: 0; width: 100%;')}
96
104
 
97
105
  @media ${({ theme }) => theme.breakpoints2026('M')} {
98
- width: calc(100% - 4rem);
106
+ ${({ variant }) => (variant !== variants.TEXT_BANNER
107
+ ? 'margin: -2rem 2rem 2rem; width: calc(100% - (2 * 2rem));'
108
+ : 'margin: 0; width: 100%;')}
99
109
  }
100
110
 
101
111
  @media ${({ theme }) => theme.breakpoints2026('L')} {
@@ -211,6 +221,7 @@ const CtaTextUnderline = styled.img`
211
221
 
212
222
  const HeroBannerLink = styled.a`
213
223
  text-decoration: none;
224
+ width: 100%;
214
225
 
215
226
  @media ${({ theme }) => theme.breakpoints2026('L')} {
216
227
 
@@ -209,7 +209,8 @@ exports[`renders "Full Height Media" Hero Banner correctly 1`] = `
209
209
 
210
210
  @media (min-width:740px) {
211
211
  .c5 {
212
- width: calc(100% - 4rem);
212
+ margin: -2rem 2rem 2rem;
213
+ width: calc(100% - (2 * 2rem));
213
214
  }
214
215
  }
215
216
 
@@ -527,7 +528,8 @@ exports[`renders "Half Height Media" Hero Banner correctly 1`] = `
527
528
 
528
529
  @media (min-width:740px) {
529
530
  .c5 {
530
- width: calc(100% - 4rem);
531
+ margin: -2rem 2rem 2rem;
532
+ width: calc(100% - (2 * 2rem));
531
533
  }
532
534
  }
533
535
 
@@ -694,6 +696,7 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
694
696
  -webkit-justify-content: center;
695
697
  -ms-flex-pack: center;
696
698
  justify-content: center;
699
+ padding: 0rem 1rem 2rem;
697
700
  }
698
701
 
699
702
  .c1 {
@@ -723,7 +726,8 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
723
726
  display: -ms-flexbox;
724
727
  display: flex;
725
728
  width: calc(100% - (2 * 1rem));
726
- margin: 2rem 1rem;
729
+ margin: 0;
730
+ width: 100%;
727
731
  }
728
732
 
729
733
  .c4 {
@@ -777,6 +781,13 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
777
781
  }
778
782
  }
779
783
 
784
+ @media (min-width:740px) {
785
+ .c0 {
786
+ padding-left: 2rem;
787
+ padding-right: 2rem;
788
+ }
789
+ }
790
+
780
791
  @media (min-width:1024px) {
781
792
  .c0 {
782
793
  padding: 0rem 2rem 2rem;
@@ -798,7 +809,8 @@ exports[`renders "Text Banner" Hero Banner correctly 1`] = `
798
809
 
799
810
  @media (min-width:740px) {
800
811
  .c2 {
801
- width: calc(100% - 4rem);
812
+ margin: 0;
813
+ width: 100%;
802
814
  }
803
815
  }
804
816