@comicrelief/component-library 7.22.0 → 7.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`renders Promo correctly 1`] = `
4
- .c6 {
4
+ .c7 {
5
5
  color: #FFFFFF;
6
6
  font-size: 5rem;
7
7
  line-height: 5rem;
@@ -16,7 +16,7 @@ exports[`renders Promo correctly 1`] = `
16
16
  line-height: 3rem;
17
17
  }
18
18
 
19
- .c7 {
19
+ .c8 {
20
20
  color: #FFFFFF;
21
21
  font-size: 1rem;
22
22
  line-height: 1rem;
@@ -39,7 +39,7 @@ exports[`renders Promo correctly 1`] = `
39
39
  object-fit: cover;
40
40
  }
41
41
 
42
- .c8 {
42
+ .c9 {
43
43
  display: -webkit-inline-box;
44
44
  display: -webkit-inline-flex;
45
45
  display: -ms-inline-flexbox;
@@ -68,7 +68,7 @@ exports[`renders Promo correctly 1`] = `
68
68
  color: #000000;
69
69
  }
70
70
 
71
- .c8:hover {
71
+ .c9:hover {
72
72
  background-color: #969598;
73
73
  color: #000000;
74
74
  }
@@ -102,13 +102,14 @@ exports[`renders Promo correctly 1`] = `
102
102
  -webkit-box-align: center;
103
103
  -ms-flex-align: center;
104
104
  align-items: center;
105
+ position: relative;
105
106
  -webkit-box-pack: end;
106
107
  -webkit-justify-content: flex-end;
107
108
  -ms-flex-pack: end;
108
109
  justify-content: flex-end;
109
110
  }
110
111
 
111
- .c5 {
112
+ .c6 {
112
113
  width: 100%;
113
114
  padding: 1.5rem 1.5rem 4rem;
114
115
  z-index: 1;
@@ -123,8 +124,21 @@ exports[`renders Promo correctly 1`] = `
123
124
  object-position: center;
124
125
  }
125
126
 
127
+ .c5 {
128
+ width: 100%;
129
+ height: 100%;
130
+ display: -webkit-box;
131
+ display: -webkit-flex;
132
+ display: -ms-flexbox;
133
+ display: flex;
134
+ -webkit-align-items: center;
135
+ -webkit-box-align: center;
136
+ -ms-flex-align: center;
137
+ align-items: center;
138
+ }
139
+
126
140
  @media (min-width:740px) {
127
- .c6 {
141
+ .c7 {
128
142
  font-size: 4rem;
129
143
  line-height: 4rem;
130
144
  margin-bottom: 2rem;
@@ -132,7 +146,7 @@ exports[`renders Promo correctly 1`] = `
132
146
  }
133
147
 
134
148
  @media (min-width:1024px) {
135
- .c6 {
149
+ .c7 {
136
150
  font-size: 5rem;
137
151
  line-height: 5rem;
138
152
  margin-bottom: 2rem;
@@ -140,7 +154,7 @@ exports[`renders Promo correctly 1`] = `
140
154
  }
141
155
 
142
156
  @media (min-width:740px) {
143
- .c8 {
157
+ .c9 {
144
158
  width: auto;
145
159
  }
146
160
  }
@@ -160,23 +174,27 @@ exports[`renders Promo correctly 1`] = `
160
174
  }
161
175
 
162
176
  @media (min-width:1024px) {
163
- .c5 {
164
- width: 70%;
165
- padding: 4rem 1.5rem;
177
+ .c6 {
178
+ width: 100%;
179
+ padding: 8rem 1.5rem;
166
180
  }
167
181
  }
168
182
 
169
183
  @media (min-width:1024px) {
170
- .c5 {
171
- width: 50%;
172
- padding: 8rem 1.5rem;
184
+ .c1 {
185
+ height: 100%;
186
+ position: absolute;
173
187
  }
174
188
  }
175
189
 
176
190
  @media (min-width:1024px) {
177
- .c1 {
178
- height: 100%;
191
+ .c5 {
192
+ width: 50%;
179
193
  position: absolute;
194
+ top: 0;
195
+ left: 0;
196
+ left: auto;
197
+ right: 0;
180
198
  }
181
199
  }
182
200
 
@@ -211,38 +229,42 @@ exports[`renders Promo correctly 1`] = `
211
229
  <div
212
230
  className="c5"
213
231
  >
214
- <h1
232
+ <div
215
233
  className="c6"
216
- color="white"
217
- size="super"
218
- >
219
- Curabitur pretium tincidunt lacus
220
- </h1>
221
- <p
222
- className="c7"
223
- color="white"
224
- size="s"
225
234
  >
226
- Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo, est eros bibendum elit, nec luctus magna sollicitudin.
227
- </p>
228
- <span>
229
- <a
235
+ <h1
236
+ className="c7"
237
+ color="white"
238
+ size="super"
239
+ >
240
+ Curabitur pretium tincidunt lacus
241
+ </h1>
242
+ <p
230
243
  className="c8"
231
244
  color="white"
232
- href="/"
233
- target="_self"
234
- type="button"
245
+ size="s"
235
246
  >
236
- Show me this
237
- </a>
238
- </span>
247
+ Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo, est eros bibendum elit, nec luctus magna sollicitudin.
248
+ </p>
249
+ <span>
250
+ <a
251
+ className="c9"
252
+ color="white"
253
+ href="/"
254
+ target="_self"
255
+ type="button"
256
+ >
257
+ Show me this
258
+ </a>
259
+ </span>
260
+ </div>
239
261
  </div>
240
262
  </div>
241
263
  </div>
242
264
  `;
243
265
 
244
266
  exports[`renders Promo correctly end position 1`] = `
245
- .c6 {
267
+ .c7 {
246
268
  color: #FFFFFF;
247
269
  font-size: 5rem;
248
270
  line-height: 5rem;
@@ -257,7 +279,7 @@ exports[`renders Promo correctly end position 1`] = `
257
279
  line-height: 3rem;
258
280
  }
259
281
 
260
- .c7 {
282
+ .c8 {
261
283
  color: #FFFFFF;
262
284
  font-size: 1rem;
263
285
  line-height: 1rem;
@@ -280,7 +302,7 @@ exports[`renders Promo correctly end position 1`] = `
280
302
  object-fit: cover;
281
303
  }
282
304
 
283
- .c8 {
305
+ .c9 {
284
306
  display: -webkit-inline-box;
285
307
  display: -webkit-inline-flex;
286
308
  display: -ms-inline-flexbox;
@@ -309,7 +331,7 @@ exports[`renders Promo correctly end position 1`] = `
309
331
  color: #000000;
310
332
  }
311
333
 
312
- .c8:hover {
334
+ .c9:hover {
313
335
  background-color: #969598;
314
336
  color: #000000;
315
337
  }
@@ -346,13 +368,14 @@ exports[`renders Promo correctly end position 1`] = `
346
368
  -webkit-box-align: center;
347
369
  -ms-flex-align: center;
348
370
  align-items: center;
371
+ position: relative;
349
372
  -webkit-box-pack: end;
350
373
  -webkit-justify-content: flex-end;
351
374
  -ms-flex-pack: end;
352
375
  justify-content: flex-end;
353
376
  }
354
377
 
355
- .c5 {
378
+ .c6 {
356
379
  width: 100%;
357
380
  padding: 1.5rem 1.5rem 4rem;
358
381
  z-index: 1;
@@ -367,8 +390,21 @@ exports[`renders Promo correctly end position 1`] = `
367
390
  object-position: center;
368
391
  }
369
392
 
393
+ .c5 {
394
+ width: 100%;
395
+ height: 100%;
396
+ display: -webkit-box;
397
+ display: -webkit-flex;
398
+ display: -ms-flexbox;
399
+ display: flex;
400
+ -webkit-align-items: center;
401
+ -webkit-box-align: center;
402
+ -ms-flex-align: center;
403
+ align-items: center;
404
+ }
405
+
370
406
  @media (min-width:740px) {
371
- .c6 {
407
+ .c7 {
372
408
  font-size: 4rem;
373
409
  line-height: 4rem;
374
410
  margin-bottom: 2rem;
@@ -376,7 +412,7 @@ exports[`renders Promo correctly end position 1`] = `
376
412
  }
377
413
 
378
414
  @media (min-width:1024px) {
379
- .c6 {
415
+ .c7 {
380
416
  font-size: 5rem;
381
417
  line-height: 5rem;
382
418
  margin-bottom: 2rem;
@@ -384,7 +420,7 @@ exports[`renders Promo correctly end position 1`] = `
384
420
  }
385
421
 
386
422
  @media (min-width:740px) {
387
- .c8 {
423
+ .c9 {
388
424
  width: auto;
389
425
  }
390
426
  }
@@ -412,23 +448,27 @@ exports[`renders Promo correctly end position 1`] = `
412
448
  }
413
449
 
414
450
  @media (min-width:1024px) {
415
- .c5 {
416
- width: 70%;
417
- padding: 4rem 1.5rem;
451
+ .c6 {
452
+ width: 100%;
453
+ padding: 8rem 1.5rem;
418
454
  }
419
455
  }
420
456
 
421
457
  @media (min-width:1024px) {
422
- .c5 {
423
- width: 50%;
424
- padding: 8rem 1.5rem;
458
+ .c1 {
459
+ height: 100%;
460
+ position: absolute;
425
461
  }
426
462
  }
427
463
 
428
464
  @media (min-width:1024px) {
429
- .c1 {
430
- height: 100%;
465
+ .c5 {
466
+ width: 50%;
431
467
  position: absolute;
468
+ top: 0;
469
+ left: 0;
470
+ left: auto;
471
+ right: 0;
432
472
  }
433
473
  }
434
474
 
@@ -463,31 +503,35 @@ exports[`renders Promo correctly end position 1`] = `
463
503
  <div
464
504
  className="c5"
465
505
  >
466
- <h1
506
+ <div
467
507
  className="c6"
468
- color="white"
469
- size="super"
470
- >
471
- Curabitur pretium tincidunt lacus
472
- </h1>
473
- <p
474
- className="c7"
475
- color="white"
476
- size="s"
477
508
  >
478
- Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo, est eros bibendum elit, nec luctus magna sollicitudin.
479
- </p>
480
- <span>
481
- <a
509
+ <h1
510
+ className="c7"
511
+ color="white"
512
+ size="super"
513
+ >
514
+ Curabitur pretium tincidunt lacus
515
+ </h1>
516
+ <p
482
517
  className="c8"
483
518
  color="white"
484
- href="/"
485
- target="_self"
486
- type="button"
519
+ size="s"
487
520
  >
488
- Show me this
489
- </a>
490
- </span>
521
+ Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo, est eros bibendum elit, nec luctus magna sollicitudin.
522
+ </p>
523
+ <span>
524
+ <a
525
+ className="c9"
526
+ color="white"
527
+ href="/"
528
+ target="_self"
529
+ type="button"
530
+ >
531
+ Show me this
532
+ </a>
533
+ </span>
534
+ </div>
491
535
  </div>
492
536
  </div>
493
537
  </div>
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": "7.22.0",
4
+ "version": "7.22.1",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -6,7 +6,7 @@ import { sizes } from '../../../theme/shared/breakpoint';
6
6
  import Picture from '../../Atoms/Picture/Picture';
7
7
 
8
8
  import {
9
- Container, Wrapper, Copy, Media
9
+ Container, Wrapper, Copy, Media, Gradient
10
10
  } from './Promo.style';
11
11
 
12
12
  const Promo = ({
@@ -25,7 +25,8 @@ const Promo = ({
25
25
  showPosterAfterPlaying,
26
26
  videoSrc,
27
27
  mobileVideoSrc,
28
- lightColouredVideo
28
+ behindTextGradient,
29
+ blackPlayButton
29
30
  }) => {
30
31
  // Store the appropriate prop in state, dependent on the breakpoint
31
32
  const [thisVideoSrc, setThisVideoSrc] = useState(null);
@@ -80,7 +81,8 @@ const Promo = ({
80
81
  <>
81
82
  <PromoVideo
82
83
  copyLeft={copyLeft}
83
- lightColouredVideo={lightColouredVideo}
84
+ behindTextGradient={behindTextGradient}
85
+ blackPlayButton={blackPlayButton}
84
86
  thisVideoSrc={thisVideoSrc}
85
87
  thisPoster={thisPoster}
86
88
  showPosterAfterPlaying={showPosterAfterPlaying}
@@ -92,9 +94,11 @@ const Promo = ({
92
94
  </Media>
93
95
 
94
96
  <Wrapper copyLeft={copyLeft}>
95
- <Copy position={position} hasVideo={hasVideo} lightColouredVideo={lightColouredVideo}>
96
- {children}
97
- </Copy>
97
+ <Gradient hasVideo={hasVideo} behindTextGradient={behindTextGradient} copyLeft={copyLeft}>
98
+ <Copy position={position} hasVideo={hasVideo} behindTextGradient={behindTextGradient}>
99
+ {children}
100
+ </Copy>
101
+ </Gradient>
98
102
  </Wrapper>
99
103
  </Container>
100
104
  );
@@ -116,7 +120,8 @@ Promo.propTypes = {
116
120
  poster: PropTypes.string,
117
121
  mobilePoster: PropTypes.string,
118
122
  showPosterAfterPlaying: PropTypes.bool,
119
- lightColouredVideo: PropTypes.bool
123
+ behindTextGradient: PropTypes.oneOf(['black', 'white', 'none']),
124
+ blackPlayButton: PropTypes.bool
120
125
  };
121
126
 
122
127
  Promo.defaultProps = {
@@ -135,7 +140,8 @@ Promo.defaultProps = {
135
140
  videoSrc: null,
136
141
  mobileVideoSrc: null,
137
142
  showPosterAfterPlaying: true,
138
- lightColouredVideo: false
143
+ behindTextGradient: 'none',
144
+ blackPlayButton: false
139
145
  };
140
146
 
141
147
  export default Promo;
@@ -15,7 +15,6 @@ import Link from '../../Atoms/Link/Link';
15
15
  imageLow={defaultData.promoImage}
16
16
  imageAltText=""
17
17
  copyLeft={true}
18
- hasOverlay={true}
19
18
  position="upper"
20
19
  >
21
20
  <Text
@@ -51,7 +50,6 @@ import Link from '../../Atoms/Link/Link';
51
50
  imageLow={defaultData.promoImage}
52
51
  imageAltText=""
53
52
  copyLeft={true}
54
- hasOverlay={true}
55
53
  position="end"
56
54
  >
57
55
  <Text
@@ -87,7 +85,6 @@ import Link from '../../Atoms/Link/Link';
87
85
  imageLow={defaultData.promoImage}
88
86
  imageAltText=""
89
87
  copyLeft={true}
90
- hasOverlay={true}
91
88
  position="lower"
92
89
  >
93
90
  <Text
@@ -123,7 +120,6 @@ import Link from '../../Atoms/Link/Link';
123
120
  imageLow={defaultData.promoImage}
124
121
  imageAltText=""
125
122
  copyLeft={true}
126
- hasOverlay={true}
127
123
  >
128
124
  <Text
129
125
  tag="h1"
@@ -164,7 +160,7 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
164
160
 
165
161
  <div>
166
162
  <Text tag="h2" size="xl" color="black">
167
- Promo Upper w/Video (autoplay and loop)
163
+ Promo Upper w/Video (autoplay and loop, black text gradient overlay)
168
164
  </Text>
169
165
  <Promo
170
166
  backgroundColor="blue_dark"
@@ -173,12 +169,12 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
173
169
  imageLow={defaultData.promoImage}
174
170
  imageAltText=""
175
171
  copyLeft={true}
176
- hasOverlay={true}
177
172
  position="upper"
178
173
  videoSrc={videoSrc}
179
174
  poster={poster}
180
175
  loop={true}
181
176
  autoplay={true}
177
+ behindTextGradient='black'
182
178
  >
183
179
  <Text
184
180
  tag="h1"
@@ -206,7 +202,7 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
206
202
  <br />
207
203
 
208
204
  <Text tag="h2" size="xl" color="black">
209
- Promo End w/Video (loop only)
205
+ Promo End w/Video (loop only, no text gradient overlay)
210
206
  </Text>
211
207
  <Promo
212
208
  backgroundColor="blue_dark"
@@ -215,7 +211,6 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
215
211
  imageLow={defaultData.promoImage}
216
212
  imageAltText=""
217
213
  copyLeft={true}
218
- hasOverlay={true}
219
214
  position="end"
220
215
  videoSrc={videoSrc}
221
216
  poster={poster}
@@ -248,25 +243,25 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
248
243
  <br />
249
244
 
250
245
  <Text tag="h2" size="xl" color="black">
251
- Promo Lower w/Video (autoplay only)
246
+ Promo Lower w/Video (autoplay only, white text gradient overlay)
252
247
  </Text>
253
248
  <Promo
254
- backgroundColor="blue_dark"
249
+ backgroundColor="blue_light"
255
250
  imageSet={defaultData.promoImage}
256
251
  image={defaultData.promoImage}
257
252
  imageLow={defaultData.promoImage}
258
253
  imageAltText=""
259
254
  copyLeft={true}
260
- hasOverlay={true}
261
255
  position="lower"
262
256
  videoSrc={videoSrc}
263
257
  poster={poster}
264
258
  loop={false}
265
259
  autoPlay={true}
260
+ behindTextGradient='white'
266
261
  >
267
262
  <Text
268
263
  tag="h1"
269
- color="white"
264
+ color="black"
270
265
  size="super"
271
266
  family="Anton"
272
267
  uppercase
@@ -274,12 +269,12 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
274
269
  >
275
270
  Curabitur pretium tincidunt lacus
276
271
  </Text>
277
- <Text tag="p" color="white">
272
+ <Text tag="p" color="black">
278
273
  Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius,
279
274
  turpis et commodo, est eros bibendum elit, nec luctus magna sollicitudin.
280
275
  </Text>
281
276
  <span>
282
- <Link href="/" type="button" color="white">
277
+ <Link href="/" type="button" color="black">
283
278
  <Text>
284
279
  Show me this
285
280
  </Text>
@@ -289,7 +284,7 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
289
284
 
290
285
  <br />
291
286
  <Text tag="h2" size="xl" color="black">
292
- Promo None w/Video (no loop or autoplay)
287
+ Promo None w/Video (no loop or autoplay, no text gradient overlay, copy right aligned)
293
288
  </Text>
294
289
  <Promo
295
290
  backgroundColor="blue_dark"
@@ -298,7 +293,6 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
298
293
  imageLow={defaultData.promoImage}
299
294
  imageAltText=""
300
295
  copyLeft={false}
301
- hasOverlay={true}
302
296
  videoSrc={videoSrc}
303
297
  poster={poster}
304
298
  loop={false}
@@ -328,7 +322,7 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
328
322
  </Promo>
329
323
 
330
324
  <Text tag="h2" size="xl" color="black">
331
- Promo None w/Video (no loop or autoplay, 'light-coloured video' setting, different videos and posters for mobile and desktop)
325
+ Promo None w/Video (no loop or autoplay, white text gradient overlay, different videos and posters for mobile and desktop)
332
326
  </Text>
333
327
  <Promo
334
328
  backgroundColor="blue_light"
@@ -337,14 +331,13 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
337
331
  imageLow={defaultData.promoImage}
338
332
  imageAltText=""
339
333
  copyLeft={true}
340
- hasOverlay={true}
341
334
  videoSrc={videoSrc}
342
335
  mobileVideoSrc={mobileVideoSrc}
343
336
  poster={poster}
344
337
  mobilePoster={mobilePoster}
345
338
  loop={false}
346
339
  autoPlay={false}
347
- lightColouredVideo={true}
340
+ behindTextGradient='white'
348
341
  >
349
342
  <Text
350
343
  tag="h1"
@@ -370,7 +363,7 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
370
363
  </Promo>
371
364
 
372
365
  <Text tag="h2" size="xl" color="black">
373
- Promo None w/Video (no loop or autoplay, 'light-coloured video' setting, mobile-only video and poster)
366
+ Promo None w/Video (no loop or autoplay, white text gradient overlay, mobile-only video and poster, black play button)
374
367
  </Text>
375
368
  <Promo
376
369
  backgroundColor="blue_light"
@@ -379,12 +372,12 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
379
372
  imageLow={defaultData.promoImage}
380
373
  imageAltText=""
381
374
  copyLeft={true}
382
- hasOverlay={true}
383
375
  mobileVideoSrc={mobileVideoSrc}
384
376
  mobilePoster={mobilePoster}
385
377
  loop={false}
386
378
  autoPlay={false}
387
- lightColouredVideo={true}
379
+ behindTextGradient='white'
380
+ blackPlayButton={true}
388
381
  >
389
382
  <Text
390
383
  tag="h1"
@@ -394,19 +387,8 @@ let mobileVideoSrc = 'https://samplelib.com/lib/preview/mp4/sample-10s.mp4';
394
387
  uppercase
395
388
  weight="normal"
396
389
  >
397
- Curabitur pretium tincidunt lacus
398
- </Text>
399
- <Text tag="p" color="black">
400
- Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius,
401
- turpis et commodo, est eros bibendum elit, nec luctus magna sollicitudin.
390
+ One-Line Special
402
391
  </Text>
403
- <span>
404
- <Link href="/" type="button" color="black">
405
- <Text>
406
- Show me this
407
- </Text>
408
- </Link>
409
- </span>
410
392
  </Promo>
411
393
 
412
394
  </div>
@@ -44,6 +44,7 @@ const Wrapper = styled.div`
44
44
  margin: 0 auto;
45
45
  display: flex;
46
46
  align-items: center;
47
+ position: relative;
47
48
 
48
49
  ${({ copyLeft }) => !copyLeft && 'justify-content: flex-end'};
49
50
  ${media('medium')} {
@@ -57,22 +58,8 @@ const Copy = styled.div`
57
58
  ${zIndex('low')};
58
59
 
59
60
  ${media('medium')} {
60
- width: 70%;
61
- padding: ${spacing('xl')} ${spacing('m')};
62
- }
63
- ${media('medium')} {
64
- width: 50%;
61
+ width: 100%;
65
62
  padding: ${spacing('xxl')} ${spacing('m')};
66
-
67
- ${({ hasVideo }) => hasVideo !== false && css`
68
- background-color: rgba(0,0,0,0.75);
69
- overflow: hidden;
70
- box-shadow: 0px 0px 75px 100px rgba(0, 0, 0, 0.75);
71
- `}
72
- ${({ hasVideo, lightColouredVideo }) => (hasVideo !== false && lightColouredVideo) && css`
73
- background-color: rgba(255, 255, 255, 0.75);
74
- box-shadow: 0px 0px 75px 100px rgba(255, 255, 255, 0.75);
75
- `}
76
63
  }
77
64
 
78
65
  ${({ position }) => position === 'lower' && css`
@@ -104,6 +91,31 @@ const Video = styled.video.attrs(() => ({
104
91
  object-fit: cover;
105
92
  `;
106
93
 
94
+ const Gradient = styled.div`
95
+ width: 100%;
96
+ height: 100%;
97
+ display: flex;
98
+ align-items: center;
99
+
100
+ ${media('medium')} {
101
+ width: 50%;
102
+ position: absolute;
103
+ top: 0;
104
+ left: 0;
105
+
106
+ ${({ copyLeft }) => (!copyLeft) && css`
107
+ left: auto;
108
+ right: 0;
109
+ `};
110
+
111
+ ${({ hasVideo, behindTextGradient }) => (hasVideo !== false && behindTextGradient !== 'none') && css`
112
+ overflow: hidden;
113
+ background-color:${behindTextGradient === 'black' ? 'rgba(0,0,0,0.5)' : 'rgba(255, 255, 255, 0.5)'};
114
+ box-shadow: 0px 0px 50px 60px ${behindTextGradient === 'black' ? 'rgba(0,0,0,0.5)' : 'rgba(255, 255, 255, 0.5)'};
115
+ `};
116
+ }
117
+ `;
118
+
107
119
  export {
108
- Container, Wrapper, Copy, Media, Video
120
+ Container, Wrapper, Copy, Media, Video, Gradient
109
121
  };