@comicrelief/component-library 8.53.3 → 8.54.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.
- package/dist/components/Molecules/CTA/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +12 -12
- package/dist/components/Molecules/CTA/CTASingleCard/CTASingleCard.md +2 -2
- package/dist/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap +2 -2
- package/dist/components/Molecules/CTA/shared/CTACard.style.js +1 -1
- package/dist/components/Molecules/SingleMessage/SingleMessage.js +12 -3
- package/dist/components/Molecules/SingleMessage/SingleMessage.md +5 -32
- package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +38 -39
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +27 -43
- package/package.json +1 -1
- package/src/components/Molecules/CTA/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +12 -12
- package/src/components/Molecules/CTA/CTASingleCard/CTASingleCard.md +2 -2
- package/src/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap +2 -2
- package/src/components/Molecules/CTA/shared/CTACard.style.js +1 -1
- package/src/components/Molecules/SingleMessage/SingleMessage.js +14 -3
- package/src/components/Molecules/SingleMessage/SingleMessage.md +5 -32
- package/src/components/Molecules/SingleMessage/SingleMessage.style.js +11 -12
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +27 -43
|
@@ -62,7 +62,7 @@ exports[`handles data structure correctly 1`] = `
|
|
|
62
62
|
</p>
|
|
63
63
|
</div>
|
|
64
64
|
<div
|
|
65
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
65
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
66
66
|
>
|
|
67
67
|
<span
|
|
68
68
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -195,7 +195,7 @@ exports[`handles data structure correctly 1`] = `
|
|
|
195
195
|
</p>
|
|
196
196
|
</div>
|
|
197
197
|
<div
|
|
198
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
198
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
199
199
|
>
|
|
200
200
|
<span
|
|
201
201
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -257,7 +257,7 @@ exports[`handles data structure correctly 1`] = `
|
|
|
257
257
|
</p>
|
|
258
258
|
</div>
|
|
259
259
|
<div
|
|
260
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
260
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
261
261
|
>
|
|
262
262
|
<span
|
|
263
263
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -363,7 +363,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
363
363
|
</p>
|
|
364
364
|
</div>
|
|
365
365
|
<div
|
|
366
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
366
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
367
367
|
>
|
|
368
368
|
<span
|
|
369
369
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -496,7 +496,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
496
496
|
</p>
|
|
497
497
|
</div>
|
|
498
498
|
<div
|
|
499
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
499
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
500
500
|
>
|
|
501
501
|
<span
|
|
502
502
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -558,7 +558,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
558
558
|
</p>
|
|
559
559
|
</div>
|
|
560
560
|
<div
|
|
561
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
561
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
562
562
|
>
|
|
563
563
|
<span
|
|
564
564
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -664,7 +664,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
664
664
|
</p>
|
|
665
665
|
</div>
|
|
666
666
|
<div
|
|
667
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
667
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
668
668
|
>
|
|
669
669
|
<span
|
|
670
670
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -797,7 +797,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
797
797
|
</p>
|
|
798
798
|
</div>
|
|
799
799
|
<div
|
|
800
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
800
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
801
801
|
>
|
|
802
802
|
<span
|
|
803
803
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -859,7 +859,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
859
859
|
</p>
|
|
860
860
|
</div>
|
|
861
861
|
<div
|
|
862
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
862
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
863
863
|
>
|
|
864
864
|
<span
|
|
865
865
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -965,7 +965,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
965
965
|
</p>
|
|
966
966
|
</div>
|
|
967
967
|
<div
|
|
968
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
968
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
969
969
|
>
|
|
970
970
|
<span
|
|
971
971
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -1098,7 +1098,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
1098
1098
|
</p>
|
|
1099
1099
|
</div>
|
|
1100
1100
|
<div
|
|
1101
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
1101
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
1102
1102
|
>
|
|
1103
1103
|
<span
|
|
1104
1104
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -1160,7 +1160,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
1160
1160
|
</p>
|
|
1161
1161
|
</div>
|
|
1162
1162
|
<div
|
|
1163
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
1163
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
1164
1164
|
>
|
|
1165
1165
|
<span
|
|
1166
1166
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -33,7 +33,7 @@ const exampleCard = {
|
|
|
33
33
|
id: 'single-card-1',
|
|
34
34
|
label: 'Example Label',
|
|
35
35
|
body: (
|
|
36
|
-
<Text tag="p">
|
|
36
|
+
<Text tag="p" style={{ marginTop: '22px' }}>
|
|
37
37
|
<strong>Single Card</strong> content here
|
|
38
38
|
</Text>
|
|
39
39
|
),
|
|
@@ -62,7 +62,7 @@ const exampleCard = {
|
|
|
62
62
|
id: 'single-card-2',
|
|
63
63
|
label: 'Example Label',
|
|
64
64
|
body: (
|
|
65
|
-
<Text tag="p">
|
|
65
|
+
<Text tag="p" style={{ marginTop: '22px' }}>
|
|
66
66
|
Single card
|
|
67
67
|
</Text>
|
|
68
68
|
),
|
package/dist/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap
CHANGED
|
@@ -241,7 +241,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
241
241
|
-ms-flex-pack: justify;
|
|
242
242
|
justify-content: space-between;
|
|
243
243
|
margin-top: auto;
|
|
244
|
-
padding-top:
|
|
244
|
+
padding-top: 2rem;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.c0 {
|
|
@@ -768,7 +768,7 @@ exports[`renders correctly without image 1`] = `
|
|
|
768
768
|
-ms-flex-pack: justify;
|
|
769
769
|
justify-content: space-between;
|
|
770
770
|
margin-top: auto;
|
|
771
|
-
padding-top:
|
|
771
|
+
padding-top: 2rem;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
774
|
.c0 {
|
|
@@ -232,4 +232,4 @@ const CardLabel = exports.CardLabel = _styledComponents.default.div.withConfig({
|
|
|
232
232
|
const CTA = exports.CTA = _styledComponents.default.div.withConfig({
|
|
233
233
|
displayName: "CTACardstyle__CTA",
|
|
234
234
|
componentId: "sc-si8xx1-10"
|
|
235
|
-
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin-top:auto;padding-top:
|
|
235
|
+
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin-top:auto;padding-top:2rem;"]);
|
|
@@ -30,12 +30,18 @@ const SingleMessage = _ref => {
|
|
|
30
30
|
vhFull = false,
|
|
31
31
|
videoID = null,
|
|
32
32
|
landscapeVideo = false,
|
|
33
|
-
|
|
33
|
+
paddingTop = '2rem',
|
|
34
|
+
paddingBottom = '2rem'
|
|
34
35
|
} = _ref;
|
|
35
36
|
const hasImage = imageSet || false;
|
|
36
37
|
const doubleImage = (imageSet || image) && (imageSet2 || image2);
|
|
37
38
|
const hasVideo = Boolean(videoID !== null && videoID !== '');
|
|
38
39
|
|
|
40
|
+
// While the Content Team don't use image or video Single Msgs any more, this just keeps
|
|
41
|
+
// things looking nice in the CL; only using the new props where they want 'em:
|
|
42
|
+
const thisPaddingTop = hasImage || hasVideo ? '0rem' : paddingTop;
|
|
43
|
+
const thisPaddingBottom = hasImage || hasVideo ? '0rem' : paddingBottom;
|
|
44
|
+
|
|
39
45
|
// States to track video status
|
|
40
46
|
const [isInitialised, setIsInitialised] = (0, _react.useState)(false);
|
|
41
47
|
const [isPlaying, setIsPlaying] = (0, _react.useState)(false);
|
|
@@ -125,7 +131,9 @@ const SingleMessage = _ref => {
|
|
|
125
131
|
hasVideo: hasVideo,
|
|
126
132
|
landscapeVideo: landscapeVideo,
|
|
127
133
|
fullImage: fullImage,
|
|
128
|
-
ref: thisRef
|
|
134
|
+
ref: thisRef,
|
|
135
|
+
paddingTop: thisPaddingTop,
|
|
136
|
+
paddingBottom: thisPaddingBottom
|
|
129
137
|
}, imageSet || imageSet2 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_SingleMessage.Media, {
|
|
130
138
|
doubleImage: doubleImage,
|
|
131
139
|
isPlaying: isPlaying,
|
|
@@ -172,7 +180,8 @@ const SingleMessage = _ref => {
|
|
|
172
180
|
copyFirst: copyFirst,
|
|
173
181
|
hasVideo: hasVideo,
|
|
174
182
|
vhFull: vhFull,
|
|
175
|
-
|
|
183
|
+
paddingTop: paddingTop,
|
|
184
|
+
paddingBottom: paddingBottom
|
|
176
185
|
}, children) : null))
|
|
177
186
|
);
|
|
178
187
|
};
|
|
@@ -71,7 +71,7 @@ import Link from '../../Atoms/Link/Link';
|
|
|
71
71
|
/>;
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Single Message with no Image
|
|
74
|
+
Single Message with no Image (default padding)
|
|
75
75
|
|
|
76
76
|
```js
|
|
77
77
|
import Text from '../../Atoms/Text/Text';
|
|
@@ -84,12 +84,12 @@ import Text from '../../Atoms/Text/Text';
|
|
|
84
84
|
</SingleMessage>;
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
Single Message with no Image
|
|
87
|
+
Single Message with no Image (no padding)
|
|
88
88
|
|
|
89
89
|
```js
|
|
90
90
|
import Text from '../../Atoms/Text/Text';
|
|
91
91
|
|
|
92
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false}
|
|
92
|
+
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingTop="0rem" paddingBottom="0rem">
|
|
93
93
|
<Text tag="p" color="white" size="xxl">
|
|
94
94
|
“The creativity that goes into helping people have a better life is
|
|
95
95
|
extraordinary.”
|
|
@@ -97,39 +97,12 @@ import Text from '../../Atoms/Text/Text';
|
|
|
97
97
|
</SingleMessage>;
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Single Message with no Image
|
|
100
|
+
Single Message with no Image (big padding)
|
|
101
101
|
|
|
102
102
|
```js
|
|
103
103
|
import Text from '../../Atoms/Text/Text';
|
|
104
104
|
|
|
105
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false}
|
|
106
|
-
<Text tag="p" color="white" size="xxl">
|
|
107
|
-
“The creativity that goes into helping people have a better life is
|
|
108
|
-
extraordinary.”
|
|
109
|
-
</Text>
|
|
110
|
-
</SingleMessage>;
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Single Message with no Image - no top padding
|
|
115
|
-
|
|
116
|
-
```js
|
|
117
|
-
import Text from '../../Atoms/Text/Text';
|
|
118
|
-
|
|
119
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingOption="upper_off">
|
|
120
|
-
<Text tag="p" color="white" size="xxl">
|
|
121
|
-
“The creativity that goes into helping people have a better life is
|
|
122
|
-
extraordinary.”
|
|
123
|
-
</Text>
|
|
124
|
-
</SingleMessage>;
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Single Message with no Image - no top and bottom padding
|
|
128
|
-
|
|
129
|
-
```js
|
|
130
|
-
import Text from '../../Atoms/Text/Text';
|
|
131
|
-
|
|
132
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingOption="both_off">
|
|
105
|
+
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingTop="4rem" paddingBottom="4rem">
|
|
133
106
|
<Text tag="p" color="white" size="xxl">
|
|
134
107
|
“The creativity that goes into helping people have a better life is
|
|
135
108
|
extraordinary.”
|
|
@@ -13,11 +13,10 @@ var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
|
|
|
13
13
|
var _videoPlayIcon = _interopRequireDefault(require("./assets/video--play-icon.svg"));
|
|
14
14
|
var _videoPlayIcon__hover = _interopRequireDefault(require("./assets/video--play-icon__hover.svg"));
|
|
15
15
|
var _loader = _interopRequireDefault(require("./assets/loader.svg"));
|
|
16
|
-
var _utils = _interopRequireDefault(require("../../../utils/_utils"));
|
|
17
16
|
const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
18
17
|
displayName: "SingleMessagestyle__Container",
|
|
19
18
|
componentId: "sc-86zg20-0"
|
|
20
|
-
})(["display:flex;position:relative;flex-direction:column;overflow:hidden;background:", "
|
|
19
|
+
})(["display:flex;position:relative;flex-direction:column;overflow:hidden;background:", ";padding-top:", ";padding-bottom:", ";iframe{height:100%;width:100%;position:absolute;top:0;", ";", ";}@media ", "{flex-direction:", ";", ";}"], _ref => {
|
|
21
20
|
let {
|
|
22
21
|
theme,
|
|
23
22
|
backgroundColor
|
|
@@ -25,84 +24,84 @@ const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
|
25
24
|
return theme.color(backgroundColor);
|
|
26
25
|
}, _ref2 => {
|
|
27
26
|
let {
|
|
28
|
-
|
|
27
|
+
paddingTop
|
|
29
28
|
} = _ref2;
|
|
30
|
-
return
|
|
29
|
+
return paddingTop;
|
|
31
30
|
}, _ref3 => {
|
|
32
31
|
let {
|
|
33
|
-
|
|
32
|
+
paddingBottom
|
|
34
33
|
} = _ref3;
|
|
35
|
-
return
|
|
34
|
+
return paddingBottom;
|
|
36
35
|
}, _ref4 => {
|
|
37
36
|
let {
|
|
38
|
-
|
|
39
|
-
hasVideo,
|
|
40
|
-
fullImage
|
|
37
|
+
copyFirst
|
|
41
38
|
} = _ref4;
|
|
42
|
-
return
|
|
39
|
+
return copyFirst === true ? 'left: auto; right: 0;' : 'left: 0; right: auto;';
|
|
43
40
|
}, _ref5 => {
|
|
44
41
|
let {
|
|
45
|
-
|
|
42
|
+
isPlaying
|
|
46
43
|
} = _ref5;
|
|
47
|
-
return
|
|
44
|
+
return isPlaying ? (0, _zIndex.default)('high') : (0, _zIndex.default)('base');
|
|
48
45
|
}, _ref6 => {
|
|
49
46
|
let {
|
|
50
|
-
|
|
47
|
+
theme
|
|
51
48
|
} = _ref6;
|
|
52
|
-
return
|
|
49
|
+
return theme.allBreakpoints('M');
|
|
50
|
+
}, _ref7 => {
|
|
51
|
+
let {
|
|
52
|
+
copyFirst
|
|
53
|
+
} = _ref7;
|
|
54
|
+
return copyFirst === true ? 'row-reverse' : 'row';
|
|
55
|
+
}, _ref8 => {
|
|
56
|
+
let {
|
|
57
|
+
landscapeVideo,
|
|
58
|
+
hasVideo,
|
|
59
|
+
fullImage
|
|
60
|
+
} = _ref8;
|
|
61
|
+
return landscapeVideo && hasVideo && !fullImage ? 'min-height: 0;' : null;
|
|
53
62
|
});
|
|
54
63
|
const Copy = exports.Copy = _styledComponents.default.div.withConfig({
|
|
55
64
|
displayName: "SingleMessagestyle__Copy",
|
|
56
65
|
componentId: "sc-86zg20-1"
|
|
57
|
-
})(["width:100%;", ";", ";padding:", ";@media ", "{", ";", ";flex-direction:column;justify-content:center;padding:", ";}", ";", "
|
|
66
|
+
})(["width:100%;", ";", ";padding:0 ", ";@media ", "{", ";", ";flex-direction:column;justify-content:center;padding:0 ", ";}", ";", ";"], (0, _zIndex.default)('low'), _ref9 => {
|
|
58
67
|
let {
|
|
59
68
|
hasVideo,
|
|
60
69
|
fullImage
|
|
61
|
-
} =
|
|
70
|
+
} = _ref9;
|
|
62
71
|
return hasVideo === true && fullImage === true ? 'display: none;' : null;
|
|
63
|
-
}, (0, _spacing.default)('l'),
|
|
72
|
+
}, (0, _spacing.default)('l'), _ref10 => {
|
|
64
73
|
let {
|
|
65
74
|
theme
|
|
66
|
-
} =
|
|
75
|
+
} = _ref10;
|
|
67
76
|
return theme.allBreakpoints('M');
|
|
68
|
-
},
|
|
77
|
+
}, _ref11 => {
|
|
69
78
|
let {
|
|
70
79
|
vhFull,
|
|
71
80
|
fullImage
|
|
72
|
-
} =
|
|
81
|
+
} = _ref11;
|
|
73
82
|
return vhFull || fullImage ? 'min-height: calc(100vh - 5.625rem); flex-direction: column; justify-content: center;' : 'height: auto;';
|
|
74
|
-
},
|
|
83
|
+
}, _ref12 => {
|
|
75
84
|
let {
|
|
76
85
|
hasVideo,
|
|
77
86
|
fullImage
|
|
78
|
-
} = _ref10;
|
|
79
|
-
return hasVideo === true && fullImage === true ? 'display: none;' : 'display: flex;';
|
|
80
|
-
}, (0, _spacing.default)('xl'), props => props.fullImage && (0, _styledComponents.css)(["@media ", "{position:absolute;width:100%;right:0;top:50%;transform:translateY(-50%);", " width:50%;}"], _ref11 => {
|
|
81
|
-
let {
|
|
82
|
-
theme
|
|
83
|
-
} = _ref11;
|
|
84
|
-
return theme.allBreakpoints('M');
|
|
85
|
-
}, props.copyFirst ? (0, _styledComponents.css)(["left:0;"]) : null), props => props.hasImage ? (0, _styledComponents.css)(["@media ", "{width:50%;}"], _ref12 => {
|
|
86
|
-
let {
|
|
87
|
-
theme
|
|
88
87
|
} = _ref12;
|
|
89
|
-
return
|
|
90
|
-
})
|
|
88
|
+
return hasVideo === true && fullImage === true ? 'display: none;' : 'display: flex;';
|
|
89
|
+
}, (0, _spacing.default)('xl'), props => props.fullImage && (0, _styledComponents.css)(["@media ", "{position:absolute;width:100%;right:0;top:50%;transform:translateY(-50%);", " width:50%;}"], _ref13 => {
|
|
91
90
|
let {
|
|
92
91
|
theme
|
|
93
92
|
} = _ref13;
|
|
94
93
|
return theme.allBreakpoints('M');
|
|
95
|
-
},
|
|
94
|
+
}, props.copyFirst ? (0, _styledComponents.css)(["left:0;"]) : null), props => props.hasImage ? (0, _styledComponents.css)(["@media ", "{width:50%;}"], _ref14 => {
|
|
96
95
|
let {
|
|
97
96
|
theme
|
|
98
97
|
} = _ref14;
|
|
99
|
-
return theme.allBreakpoints('
|
|
100
|
-
}, _ref15 => {
|
|
98
|
+
return theme.allBreakpoints('M');
|
|
99
|
+
}) : (0, _styledComponents.css)(["@media ", "{width:100%;max-width ", ";padding:0 ", ";}margin:auto;padding:", ";"], _ref15 => {
|
|
101
100
|
let {
|
|
102
|
-
|
|
101
|
+
theme
|
|
103
102
|
} = _ref15;
|
|
104
|
-
return
|
|
105
|
-
});
|
|
103
|
+
return theme.allBreakpoints('M');
|
|
104
|
+
}, _containers.default.small, (0, _spacing.default)('xl'), (0, _spacing.default)('md')));
|
|
106
105
|
const Media = exports.Media = _styledComponents.default.div.withConfig({
|
|
107
106
|
displayName: "SingleMessagestyle__Media",
|
|
108
107
|
componentId: "sc-86zg20-2"
|
|
@@ -49,6 +49,8 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
49
49
|
flex-direction: column;
|
|
50
50
|
overflow: hidden;
|
|
51
51
|
background: #6F3AAB;
|
|
52
|
+
padding-top: 0rem;
|
|
53
|
+
padding-bottom: 0rem;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
.c0 iframe {
|
|
@@ -64,7 +66,7 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
64
66
|
.c5 {
|
|
65
67
|
width: 100%;
|
|
66
68
|
z-index: 1;
|
|
67
|
-
padding: 2rem;
|
|
69
|
+
padding: 0 2rem;
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
.c1 {
|
|
@@ -122,7 +124,7 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
122
124
|
-webkit-justify-content: center;
|
|
123
125
|
-ms-flex-pack: center;
|
|
124
126
|
justify-content: center;
|
|
125
|
-
padding: 4rem;
|
|
127
|
+
padding: 0 4rem;
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
@@ -132,10 +134,6 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
|
|
135
|
-
@media (min-width:1024px) {
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
137
|
@media (min-width:740px) {
|
|
140
138
|
.c1 {
|
|
141
139
|
height: auto;
|
|
@@ -319,6 +317,8 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
319
317
|
flex-direction: column;
|
|
320
318
|
overflow: hidden;
|
|
321
319
|
background: #6F3AAB;
|
|
320
|
+
padding-top: 0rem;
|
|
321
|
+
padding-bottom: 0rem;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
.c0 iframe {
|
|
@@ -334,7 +334,7 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
334
334
|
.c5 {
|
|
335
335
|
width: 100%;
|
|
336
336
|
z-index: 1;
|
|
337
|
-
padding: 2rem;
|
|
337
|
+
padding: 0 2rem;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
.c1 {
|
|
@@ -425,7 +425,7 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
425
425
|
-webkit-justify-content: center;
|
|
426
426
|
-ms-flex-pack: center;
|
|
427
427
|
justify-content: center;
|
|
428
|
-
padding: 4rem;
|
|
428
|
+
padding: 0 4rem;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
|
|
@@ -435,10 +435,6 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
@media (min-width:1024px) {
|
|
439
|
-
|
|
440
|
-
}
|
|
441
|
-
|
|
442
438
|
@media (min-width:740px) {
|
|
443
439
|
.c1 {
|
|
444
440
|
height: auto;
|
|
@@ -561,6 +557,8 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
561
557
|
flex-direction: column;
|
|
562
558
|
overflow: hidden;
|
|
563
559
|
background: #FFE400;
|
|
560
|
+
padding-top: 0rem;
|
|
561
|
+
padding-bottom: 0rem;
|
|
564
562
|
}
|
|
565
563
|
|
|
566
564
|
.c0 iframe {
|
|
@@ -576,7 +574,7 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
576
574
|
.c5 {
|
|
577
575
|
width: 100%;
|
|
578
576
|
z-index: 1;
|
|
579
|
-
padding: 2rem;
|
|
577
|
+
padding: 0 2rem;
|
|
580
578
|
}
|
|
581
579
|
|
|
582
580
|
.c1 {
|
|
@@ -639,7 +637,7 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
639
637
|
-webkit-justify-content: center;
|
|
640
638
|
-ms-flex-pack: center;
|
|
641
639
|
justify-content: center;
|
|
642
|
-
padding: 4rem;
|
|
640
|
+
padding: 0 4rem;
|
|
643
641
|
}
|
|
644
642
|
}
|
|
645
643
|
|
|
@@ -649,10 +647,6 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
649
647
|
}
|
|
650
648
|
}
|
|
651
649
|
|
|
652
|
-
@media (min-width:1024px) {
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
|
|
656
650
|
@media (min-width:740px) {
|
|
657
651
|
|
|
658
652
|
}
|
|
@@ -661,10 +655,6 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
661
655
|
|
|
662
656
|
}
|
|
663
657
|
|
|
664
|
-
@media (min-width:1024px) {
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
|
|
668
658
|
@media (min-width:740px) {
|
|
669
659
|
.c1 {
|
|
670
660
|
height: auto;
|
|
@@ -880,6 +870,8 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
880
870
|
flex-direction: column;
|
|
881
871
|
overflow: hidden;
|
|
882
872
|
background: #6F3AAB;
|
|
873
|
+
padding-top: 0rem;
|
|
874
|
+
padding-bottom: 0rem;
|
|
883
875
|
}
|
|
884
876
|
|
|
885
877
|
.c0 iframe {
|
|
@@ -895,7 +887,7 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
895
887
|
.c5 {
|
|
896
888
|
width: 100%;
|
|
897
889
|
z-index: 1;
|
|
898
|
-
padding: 2rem;
|
|
890
|
+
padding: 0 2rem;
|
|
899
891
|
}
|
|
900
892
|
|
|
901
893
|
.c1 {
|
|
@@ -993,7 +985,7 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
993
985
|
-webkit-justify-content: center;
|
|
994
986
|
-ms-flex-pack: center;
|
|
995
987
|
justify-content: center;
|
|
996
|
-
padding: 4rem;
|
|
988
|
+
padding: 0 4rem;
|
|
997
989
|
}
|
|
998
990
|
}
|
|
999
991
|
|
|
@@ -1016,10 +1008,6 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
1016
1008
|
}
|
|
1017
1009
|
}
|
|
1018
1010
|
|
|
1019
|
-
@media (min-width:1024px) {
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
1011
|
@media (min-width:740px) {
|
|
1024
1012
|
.c1 {
|
|
1025
1013
|
height: auto;
|
|
@@ -1122,6 +1110,8 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
1122
1110
|
flex-direction: column;
|
|
1123
1111
|
overflow: hidden;
|
|
1124
1112
|
background: #6F3AAB;
|
|
1113
|
+
padding-top: 0rem;
|
|
1114
|
+
padding-bottom: 0rem;
|
|
1125
1115
|
}
|
|
1126
1116
|
|
|
1127
1117
|
.c0 iframe {
|
|
@@ -1182,10 +1172,6 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
1182
1172
|
|
|
1183
1173
|
}
|
|
1184
1174
|
|
|
1185
|
-
@media (min-width:1024px) {
|
|
1186
|
-
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
1175
|
@media (min-width:740px) {
|
|
1190
1176
|
.c1 {
|
|
1191
1177
|
height: auto;
|
|
@@ -1274,6 +1260,8 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1274
1260
|
flex-direction: column;
|
|
1275
1261
|
overflow: hidden;
|
|
1276
1262
|
background: #6F3AAB;
|
|
1263
|
+
padding-top: 2rem;
|
|
1264
|
+
padding-bottom: 2rem;
|
|
1277
1265
|
}
|
|
1278
1266
|
|
|
1279
1267
|
.c0 iframe {
|
|
@@ -1289,7 +1277,7 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1289
1277
|
.c1 {
|
|
1290
1278
|
width: 100%;
|
|
1291
1279
|
z-index: 1;
|
|
1292
|
-
padding: 2rem;
|
|
1280
|
+
padding: 0 2rem;
|
|
1293
1281
|
margin: auto;
|
|
1294
1282
|
padding: 1rem;
|
|
1295
1283
|
}
|
|
@@ -1332,6 +1320,10 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1332
1320
|
}
|
|
1333
1321
|
}
|
|
1334
1322
|
|
|
1323
|
+
@media (min-width:740px) {
|
|
1324
|
+
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1335
1327
|
@media (min-width:740px) {
|
|
1336
1328
|
.c1 {
|
|
1337
1329
|
height: auto;
|
|
@@ -1346,7 +1338,7 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1346
1338
|
-webkit-justify-content: center;
|
|
1347
1339
|
-ms-flex-pack: center;
|
|
1348
1340
|
justify-content: center;
|
|
1349
|
-
padding: 4rem;
|
|
1341
|
+
padding: 0 4rem;
|
|
1350
1342
|
}
|
|
1351
1343
|
}
|
|
1352
1344
|
|
|
@@ -1354,14 +1346,10 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1354
1346
|
.c1 {
|
|
1355
1347
|
width: 100%;
|
|
1356
1348
|
max-width: 880px;
|
|
1357
|
-
padding: 4rem;
|
|
1349
|
+
padding: 0 4rem;
|
|
1358
1350
|
}
|
|
1359
1351
|
}
|
|
1360
1352
|
|
|
1361
|
-
@media (min-width:1024px) {
|
|
1362
|
-
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
1353
|
@media (min-width:740px) {
|
|
1366
1354
|
|
|
1367
1355
|
}
|
|
@@ -1370,10 +1358,6 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1370
1358
|
|
|
1371
1359
|
}
|
|
1372
1360
|
|
|
1373
|
-
@media (min-width:1024px) {
|
|
1374
|
-
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
1361
|
@media (min-width:740px) {
|
|
1378
1362
|
|
|
1379
1363
|
}
|
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@ exports[`handles data structure correctly 1`] = `
|
|
|
62
62
|
</p>
|
|
63
63
|
</div>
|
|
64
64
|
<div
|
|
65
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
65
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
66
66
|
>
|
|
67
67
|
<span
|
|
68
68
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -195,7 +195,7 @@ exports[`handles data structure correctly 1`] = `
|
|
|
195
195
|
</p>
|
|
196
196
|
</div>
|
|
197
197
|
<div
|
|
198
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
198
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
199
199
|
>
|
|
200
200
|
<span
|
|
201
201
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -257,7 +257,7 @@ exports[`handles data structure correctly 1`] = `
|
|
|
257
257
|
</p>
|
|
258
258
|
</div>
|
|
259
259
|
<div
|
|
260
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
260
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
261
261
|
>
|
|
262
262
|
<span
|
|
263
263
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -363,7 +363,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
363
363
|
</p>
|
|
364
364
|
</div>
|
|
365
365
|
<div
|
|
366
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
366
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
367
367
|
>
|
|
368
368
|
<span
|
|
369
369
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -496,7 +496,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
496
496
|
</p>
|
|
497
497
|
</div>
|
|
498
498
|
<div
|
|
499
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
499
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
500
500
|
>
|
|
501
501
|
<span
|
|
502
502
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -558,7 +558,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
558
558
|
</p>
|
|
559
559
|
</div>
|
|
560
560
|
<div
|
|
561
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
561
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
562
562
|
>
|
|
563
563
|
<span
|
|
564
564
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -664,7 +664,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
664
664
|
</p>
|
|
665
665
|
</div>
|
|
666
666
|
<div
|
|
667
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
667
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
668
668
|
>
|
|
669
669
|
<span
|
|
670
670
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -797,7 +797,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
797
797
|
</p>
|
|
798
798
|
</div>
|
|
799
799
|
<div
|
|
800
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
800
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
801
801
|
>
|
|
802
802
|
<span
|
|
803
803
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -859,7 +859,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
859
859
|
</p>
|
|
860
860
|
</div>
|
|
861
861
|
<div
|
|
862
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
862
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
863
863
|
>
|
|
864
864
|
<span
|
|
865
865
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -965,7 +965,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
965
965
|
</p>
|
|
966
966
|
</div>
|
|
967
967
|
<div
|
|
968
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
968
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
969
969
|
>
|
|
970
970
|
<span
|
|
971
971
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -1098,7 +1098,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
1098
1098
|
</p>
|
|
1099
1099
|
</div>
|
|
1100
1100
|
<div
|
|
1101
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
1101
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
1102
1102
|
>
|
|
1103
1103
|
<span
|
|
1104
1104
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -1160,7 +1160,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
1160
1160
|
</p>
|
|
1161
1161
|
</div>
|
|
1162
1162
|
<div
|
|
1163
|
-
className="CTACardstyle__CTA-sc-si8xx1-10
|
|
1163
|
+
className="CTACardstyle__CTA-sc-si8xx1-10 noohS"
|
|
1164
1164
|
>
|
|
1165
1165
|
<span
|
|
1166
1166
|
className="CTACardstyle__CTAText-sc-si8xx1-1 dQjaWt"
|
|
@@ -33,7 +33,7 @@ const exampleCard = {
|
|
|
33
33
|
id: 'single-card-1',
|
|
34
34
|
label: 'Example Label',
|
|
35
35
|
body: (
|
|
36
|
-
<Text tag="p">
|
|
36
|
+
<Text tag="p" style={{ marginTop: '22px' }}>
|
|
37
37
|
<strong>Single Card</strong> content here
|
|
38
38
|
</Text>
|
|
39
39
|
),
|
|
@@ -62,7 +62,7 @@ const exampleCard = {
|
|
|
62
62
|
id: 'single-card-2',
|
|
63
63
|
label: 'Example Label',
|
|
64
64
|
body: (
|
|
65
|
-
<Text tag="p">
|
|
65
|
+
<Text tag="p" style={{ marginTop: '22px' }}>
|
|
66
66
|
Single card
|
|
67
67
|
</Text>
|
|
68
68
|
),
|
|
@@ -241,7 +241,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
241
241
|
-ms-flex-pack: justify;
|
|
242
242
|
justify-content: space-between;
|
|
243
243
|
margin-top: auto;
|
|
244
|
-
padding-top:
|
|
244
|
+
padding-top: 2rem;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.c0 {
|
|
@@ -768,7 +768,7 @@ exports[`renders correctly without image 1`] = `
|
|
|
768
768
|
-ms-flex-pack: justify;
|
|
769
769
|
justify-content: space-between;
|
|
770
770
|
margin-top: auto;
|
|
771
|
-
padding-top:
|
|
771
|
+
padding-top: 2rem;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
774
|
.c0 {
|
|
@@ -31,12 +31,18 @@ const SingleMessage = ({
|
|
|
31
31
|
vhFull = false,
|
|
32
32
|
videoID = null,
|
|
33
33
|
landscapeVideo = false,
|
|
34
|
-
|
|
34
|
+
paddingTop = '2rem',
|
|
35
|
+
paddingBottom = '2rem'
|
|
35
36
|
}) => {
|
|
36
37
|
const hasImage = imageSet || false;
|
|
37
38
|
const doubleImage = (imageSet || image) && (imageSet2 || image2);
|
|
38
39
|
const hasVideo = Boolean(videoID !== null && videoID !== '');
|
|
39
40
|
|
|
41
|
+
// While the Content Team don't use image or video Single Msgs any more, this just keeps
|
|
42
|
+
// things looking nice in the CL; only using the new props where they want 'em:
|
|
43
|
+
const thisPaddingTop = hasImage || hasVideo ? '0rem' : paddingTop;
|
|
44
|
+
const thisPaddingBottom = hasImage || hasVideo ? '0rem' : paddingBottom;
|
|
45
|
+
|
|
40
46
|
// States to track video status
|
|
41
47
|
const [isInitialised, setIsInitialised] = useState(false);
|
|
42
48
|
const [isPlaying, setIsPlaying] = useState(false);
|
|
@@ -139,6 +145,8 @@ const SingleMessage = ({
|
|
|
139
145
|
landscapeVideo={landscapeVideo}
|
|
140
146
|
fullImage={fullImage}
|
|
141
147
|
ref={thisRef}
|
|
148
|
+
paddingTop={thisPaddingTop}
|
|
149
|
+
paddingBottom={thisPaddingBottom}
|
|
142
150
|
>
|
|
143
151
|
{imageSet || imageSet2 ? (
|
|
144
152
|
<>
|
|
@@ -210,7 +218,8 @@ const SingleMessage = ({
|
|
|
210
218
|
copyFirst={copyFirst}
|
|
211
219
|
hasVideo={hasVideo}
|
|
212
220
|
vhFull={vhFull}
|
|
213
|
-
|
|
221
|
+
paddingTop={paddingTop}
|
|
222
|
+
paddingBottom={paddingBottom}
|
|
214
223
|
>
|
|
215
224
|
{children}
|
|
216
225
|
</Copy>
|
|
@@ -239,7 +248,9 @@ SingleMessage.propTypes = {
|
|
|
239
248
|
vhFull: PropTypes.bool,
|
|
240
249
|
videoID: PropTypes.string,
|
|
241
250
|
landscapeVideo: PropTypes.bool,
|
|
242
|
-
|
|
251
|
+
paddingTop: PropTypes.string,
|
|
252
|
+
paddingBottom: PropTypes.string
|
|
253
|
+
|
|
243
254
|
};
|
|
244
255
|
|
|
245
256
|
export default SingleMessage;
|
|
@@ -71,7 +71,7 @@ import Link from '../../Atoms/Link/Link';
|
|
|
71
71
|
/>;
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Single Message with no Image
|
|
74
|
+
Single Message with no Image (default padding)
|
|
75
75
|
|
|
76
76
|
```js
|
|
77
77
|
import Text from '../../Atoms/Text/Text';
|
|
@@ -84,12 +84,12 @@ import Text from '../../Atoms/Text/Text';
|
|
|
84
84
|
</SingleMessage>;
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
Single Message with no Image
|
|
87
|
+
Single Message with no Image (no padding)
|
|
88
88
|
|
|
89
89
|
```js
|
|
90
90
|
import Text from '../../Atoms/Text/Text';
|
|
91
91
|
|
|
92
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false}
|
|
92
|
+
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingTop="0rem" paddingBottom="0rem">
|
|
93
93
|
<Text tag="p" color="white" size="xxl">
|
|
94
94
|
“The creativity that goes into helping people have a better life is
|
|
95
95
|
extraordinary.”
|
|
@@ -97,39 +97,12 @@ import Text from '../../Atoms/Text/Text';
|
|
|
97
97
|
</SingleMessage>;
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Single Message with no Image
|
|
100
|
+
Single Message with no Image (big padding)
|
|
101
101
|
|
|
102
102
|
```js
|
|
103
103
|
import Text from '../../Atoms/Text/Text';
|
|
104
104
|
|
|
105
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false}
|
|
106
|
-
<Text tag="p" color="white" size="xxl">
|
|
107
|
-
“The creativity that goes into helping people have a better life is
|
|
108
|
-
extraordinary.”
|
|
109
|
-
</Text>
|
|
110
|
-
</SingleMessage>;
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Single Message with no Image - no top padding
|
|
115
|
-
|
|
116
|
-
```js
|
|
117
|
-
import Text from '../../Atoms/Text/Text';
|
|
118
|
-
|
|
119
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingOption="upper_off">
|
|
120
|
-
<Text tag="p" color="white" size="xxl">
|
|
121
|
-
“The creativity that goes into helping people have a better life is
|
|
122
|
-
extraordinary.”
|
|
123
|
-
</Text>
|
|
124
|
-
</SingleMessage>;
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Single Message with no Image - no top and bottom padding
|
|
128
|
-
|
|
129
|
-
```js
|
|
130
|
-
import Text from '../../Atoms/Text/Text';
|
|
131
|
-
|
|
132
|
-
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingOption="both_off">
|
|
105
|
+
<SingleMessage backgroundColor="purple_dark" copyFirst={false} paddingTop="4rem" paddingBottom="4rem">
|
|
133
106
|
<Text tag="p" color="white" size="xxl">
|
|
134
107
|
“The creativity that goes into helping people have a better life is
|
|
135
108
|
extraordinary.”
|
|
@@ -5,7 +5,6 @@ import zIndex from '../../../theme/shared/zIndex';
|
|
|
5
5
|
import playIcon from './assets/video--play-icon.svg';
|
|
6
6
|
import playIconHover from './assets/video--play-icon__hover.svg';
|
|
7
7
|
import loadingIcon from './assets/loader.svg';
|
|
8
|
-
import handlePadding from '../../../utils/_utils';
|
|
9
8
|
|
|
10
9
|
const Container = styled.div`
|
|
11
10
|
display: flex;
|
|
@@ -13,10 +12,9 @@ const Container = styled.div`
|
|
|
13
12
|
flex-direction: column;
|
|
14
13
|
overflow: hidden;
|
|
15
14
|
background: ${({ theme, backgroundColor }) => theme.color(backgroundColor)};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
15
|
+
padding-top: ${({ paddingTop }) => paddingTop};
|
|
16
|
+
padding-bottom: ${({ paddingBottom }) => paddingBottom};
|
|
17
|
+
|
|
20
18
|
iframe {
|
|
21
19
|
height: 100%;
|
|
22
20
|
width: 100%;
|
|
@@ -25,13 +23,18 @@ const Container = styled.div`
|
|
|
25
23
|
${({ copyFirst }) => (copyFirst === true ? 'left: auto; right: 0;' : 'left: 0; right: auto;')};
|
|
26
24
|
${({ isPlaying }) => (isPlaying ? zIndex('high') : zIndex('base'))};
|
|
27
25
|
}
|
|
26
|
+
|
|
27
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
28
|
+
flex-direction: ${({ copyFirst }) => (copyFirst === true ? 'row-reverse' : 'row')};
|
|
29
|
+
${({ landscapeVideo, hasVideo, fullImage }) => (landscapeVideo && hasVideo && !fullImage ? 'min-height: 0;' : null)};
|
|
30
|
+
}
|
|
28
31
|
`;
|
|
29
32
|
|
|
30
33
|
const Copy = styled.div`
|
|
31
34
|
width: 100%;
|
|
32
35
|
${zIndex('low')};
|
|
33
36
|
${({ hasVideo, fullImage }) => (hasVideo === true && fullImage === true ? 'display: none;' : null)};
|
|
34
|
-
padding: ${spacing('l')};
|
|
37
|
+
padding: 0 ${spacing('l')};
|
|
35
38
|
|
|
36
39
|
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
37
40
|
${({ vhFull, fullImage }) => (vhFull || fullImage
|
|
@@ -44,7 +47,7 @@ const Copy = styled.div`
|
|
|
44
47
|
|
|
45
48
|
flex-direction: column;
|
|
46
49
|
justify-content: center;
|
|
47
|
-
padding: ${spacing('xl')};
|
|
50
|
+
padding: 0 ${spacing('xl')};
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
${props => props.fullImage
|
|
@@ -69,15 +72,11 @@ const Copy = styled.div`
|
|
|
69
72
|
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
70
73
|
width: 100%;
|
|
71
74
|
max-width ${containers.small};
|
|
72
|
-
padding: ${spacing('xl')};
|
|
75
|
+
padding: 0 ${spacing('xl')};
|
|
73
76
|
}
|
|
74
77
|
margin: auto;
|
|
75
78
|
padding: ${spacing('md')};
|
|
76
79
|
`)};
|
|
77
|
-
|
|
78
|
-
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
79
|
-
${({ paddingOption }) => handlePadding(paddingOption)};
|
|
80
|
-
}
|
|
81
80
|
`;
|
|
82
81
|
|
|
83
82
|
const Media = styled.div`
|
|
@@ -49,6 +49,8 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
49
49
|
flex-direction: column;
|
|
50
50
|
overflow: hidden;
|
|
51
51
|
background: #6F3AAB;
|
|
52
|
+
padding-top: 0rem;
|
|
53
|
+
padding-bottom: 0rem;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
.c0 iframe {
|
|
@@ -64,7 +66,7 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
64
66
|
.c5 {
|
|
65
67
|
width: 100%;
|
|
66
68
|
z-index: 1;
|
|
67
|
-
padding: 2rem;
|
|
69
|
+
padding: 0 2rem;
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
.c1 {
|
|
@@ -122,7 +124,7 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
122
124
|
-webkit-justify-content: center;
|
|
123
125
|
-ms-flex-pack: center;
|
|
124
126
|
justify-content: center;
|
|
125
|
-
padding: 4rem;
|
|
127
|
+
padding: 0 4rem;
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
@@ -132,10 +134,6 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
|
|
135
|
-
@media (min-width:1024px) {
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
137
|
@media (min-width:740px) {
|
|
140
138
|
.c1 {
|
|
141
139
|
height: auto;
|
|
@@ -319,6 +317,8 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
319
317
|
flex-direction: column;
|
|
320
318
|
overflow: hidden;
|
|
321
319
|
background: #6F3AAB;
|
|
320
|
+
padding-top: 0rem;
|
|
321
|
+
padding-bottom: 0rem;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
.c0 iframe {
|
|
@@ -334,7 +334,7 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
334
334
|
.c5 {
|
|
335
335
|
width: 100%;
|
|
336
336
|
z-index: 1;
|
|
337
|
-
padding: 2rem;
|
|
337
|
+
padding: 0 2rem;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
.c1 {
|
|
@@ -425,7 +425,7 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
425
425
|
-webkit-justify-content: center;
|
|
426
426
|
-ms-flex-pack: center;
|
|
427
427
|
justify-content: center;
|
|
428
|
-
padding: 4rem;
|
|
428
|
+
padding: 0 4rem;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
|
|
@@ -435,10 +435,6 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
@media (min-width:1024px) {
|
|
439
|
-
|
|
440
|
-
}
|
|
441
|
-
|
|
442
438
|
@media (min-width:740px) {
|
|
443
439
|
.c1 {
|
|
444
440
|
height: auto;
|
|
@@ -561,6 +557,8 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
561
557
|
flex-direction: column;
|
|
562
558
|
overflow: hidden;
|
|
563
559
|
background: #FFE400;
|
|
560
|
+
padding-top: 0rem;
|
|
561
|
+
padding-bottom: 0rem;
|
|
564
562
|
}
|
|
565
563
|
|
|
566
564
|
.c0 iframe {
|
|
@@ -576,7 +574,7 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
576
574
|
.c5 {
|
|
577
575
|
width: 100%;
|
|
578
576
|
z-index: 1;
|
|
579
|
-
padding: 2rem;
|
|
577
|
+
padding: 0 2rem;
|
|
580
578
|
}
|
|
581
579
|
|
|
582
580
|
.c1 {
|
|
@@ -639,7 +637,7 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
639
637
|
-webkit-justify-content: center;
|
|
640
638
|
-ms-flex-pack: center;
|
|
641
639
|
justify-content: center;
|
|
642
|
-
padding: 4rem;
|
|
640
|
+
padding: 0 4rem;
|
|
643
641
|
}
|
|
644
642
|
}
|
|
645
643
|
|
|
@@ -649,10 +647,6 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
649
647
|
}
|
|
650
648
|
}
|
|
651
649
|
|
|
652
|
-
@media (min-width:1024px) {
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
|
|
656
650
|
@media (min-width:740px) {
|
|
657
651
|
|
|
658
652
|
}
|
|
@@ -661,10 +655,6 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
661
655
|
|
|
662
656
|
}
|
|
663
657
|
|
|
664
|
-
@media (min-width:1024px) {
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
|
|
668
658
|
@media (min-width:740px) {
|
|
669
659
|
.c1 {
|
|
670
660
|
height: auto;
|
|
@@ -880,6 +870,8 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
880
870
|
flex-direction: column;
|
|
881
871
|
overflow: hidden;
|
|
882
872
|
background: #6F3AAB;
|
|
873
|
+
padding-top: 0rem;
|
|
874
|
+
padding-bottom: 0rem;
|
|
883
875
|
}
|
|
884
876
|
|
|
885
877
|
.c0 iframe {
|
|
@@ -895,7 +887,7 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
895
887
|
.c5 {
|
|
896
888
|
width: 100%;
|
|
897
889
|
z-index: 1;
|
|
898
|
-
padding: 2rem;
|
|
890
|
+
padding: 0 2rem;
|
|
899
891
|
}
|
|
900
892
|
|
|
901
893
|
.c1 {
|
|
@@ -993,7 +985,7 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
993
985
|
-webkit-justify-content: center;
|
|
994
986
|
-ms-flex-pack: center;
|
|
995
987
|
justify-content: center;
|
|
996
|
-
padding: 4rem;
|
|
988
|
+
padding: 0 4rem;
|
|
997
989
|
}
|
|
998
990
|
}
|
|
999
991
|
|
|
@@ -1016,10 +1008,6 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
1016
1008
|
}
|
|
1017
1009
|
}
|
|
1018
1010
|
|
|
1019
|
-
@media (min-width:1024px) {
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
1011
|
@media (min-width:740px) {
|
|
1024
1012
|
.c1 {
|
|
1025
1013
|
height: auto;
|
|
@@ -1122,6 +1110,8 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
1122
1110
|
flex-direction: column;
|
|
1123
1111
|
overflow: hidden;
|
|
1124
1112
|
background: #6F3AAB;
|
|
1113
|
+
padding-top: 0rem;
|
|
1114
|
+
padding-bottom: 0rem;
|
|
1125
1115
|
}
|
|
1126
1116
|
|
|
1127
1117
|
.c0 iframe {
|
|
@@ -1182,10 +1172,6 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
1182
1172
|
|
|
1183
1173
|
}
|
|
1184
1174
|
|
|
1185
|
-
@media (min-width:1024px) {
|
|
1186
|
-
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
1175
|
@media (min-width:740px) {
|
|
1190
1176
|
.c1 {
|
|
1191
1177
|
height: auto;
|
|
@@ -1274,6 +1260,8 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1274
1260
|
flex-direction: column;
|
|
1275
1261
|
overflow: hidden;
|
|
1276
1262
|
background: #6F3AAB;
|
|
1263
|
+
padding-top: 2rem;
|
|
1264
|
+
padding-bottom: 2rem;
|
|
1277
1265
|
}
|
|
1278
1266
|
|
|
1279
1267
|
.c0 iframe {
|
|
@@ -1289,7 +1277,7 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1289
1277
|
.c1 {
|
|
1290
1278
|
width: 100%;
|
|
1291
1279
|
z-index: 1;
|
|
1292
|
-
padding: 2rem;
|
|
1280
|
+
padding: 0 2rem;
|
|
1293
1281
|
margin: auto;
|
|
1294
1282
|
padding: 1rem;
|
|
1295
1283
|
}
|
|
@@ -1332,6 +1320,10 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1332
1320
|
}
|
|
1333
1321
|
}
|
|
1334
1322
|
|
|
1323
|
+
@media (min-width:740px) {
|
|
1324
|
+
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1335
1327
|
@media (min-width:740px) {
|
|
1336
1328
|
.c1 {
|
|
1337
1329
|
height: auto;
|
|
@@ -1346,7 +1338,7 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1346
1338
|
-webkit-justify-content: center;
|
|
1347
1339
|
-ms-flex-pack: center;
|
|
1348
1340
|
justify-content: center;
|
|
1349
|
-
padding: 4rem;
|
|
1341
|
+
padding: 0 4rem;
|
|
1350
1342
|
}
|
|
1351
1343
|
}
|
|
1352
1344
|
|
|
@@ -1354,14 +1346,10 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1354
1346
|
.c1 {
|
|
1355
1347
|
width: 100%;
|
|
1356
1348
|
max-width: 880px;
|
|
1357
|
-
padding: 4rem;
|
|
1349
|
+
padding: 0 4rem;
|
|
1358
1350
|
}
|
|
1359
1351
|
}
|
|
1360
1352
|
|
|
1361
|
-
@media (min-width:1024px) {
|
|
1362
|
-
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
1353
|
@media (min-width:740px) {
|
|
1366
1354
|
|
|
1367
1355
|
}
|
|
@@ -1370,10 +1358,6 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1370
1358
|
|
|
1371
1359
|
}
|
|
1372
1360
|
|
|
1373
|
-
@media (min-width:1024px) {
|
|
1374
|
-
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
1361
|
@media (min-width:740px) {
|
|
1378
1362
|
|
|
1379
1363
|
}
|