@comicrelief/component-library 8.55.5 → 8.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Molecules/SingleMessage/SingleMessage.js +8 -2
- package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +70 -60
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +13 -1
- package/package.json +1 -1
- package/src/components/Molecules/SingleMessage/SingleMessage.js +10 -3
- package/src/components/Molecules/SingleMessage/SingleMessage.style.js +18 -14
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +13 -1
|
@@ -31,7 +31,9 @@ const SingleMessage = _ref => {
|
|
|
31
31
|
videoID = null,
|
|
32
32
|
landscapeVideo = false,
|
|
33
33
|
paddingTop = '2rem',
|
|
34
|
-
paddingBottom = '2rem'
|
|
34
|
+
paddingBottom = '2rem',
|
|
35
|
+
smPaddingTop = '2rem',
|
|
36
|
+
smPaddingBottom = '2rem'
|
|
35
37
|
} = _ref;
|
|
36
38
|
const hasImage = imageSet || false;
|
|
37
39
|
const doubleImage = (imageSet || image) && (imageSet2 || image2);
|
|
@@ -41,6 +43,8 @@ const SingleMessage = _ref => {
|
|
|
41
43
|
// things looking nice in the CL; only using the new props where they want 'em:
|
|
42
44
|
const thisPaddingTop = hasImage || hasVideo ? '0rem' : paddingTop;
|
|
43
45
|
const thisPaddingBottom = hasImage || hasVideo ? '0rem' : paddingBottom;
|
|
46
|
+
const thisSmPaddingTop = hasImage || hasVideo ? '0rem' : smPaddingTop;
|
|
47
|
+
const thisSmPaddingBottom = hasImage || hasVideo ? '0rem' : smPaddingBottom;
|
|
44
48
|
|
|
45
49
|
// States to track video status
|
|
46
50
|
const [isInitialised, setIsInitialised] = (0, _react.useState)(false);
|
|
@@ -133,7 +137,9 @@ const SingleMessage = _ref => {
|
|
|
133
137
|
fullImage: fullImage,
|
|
134
138
|
ref: thisRef,
|
|
135
139
|
paddingTop: thisPaddingTop,
|
|
136
|
-
paddingBottom: thisPaddingBottom
|
|
140
|
+
paddingBottom: thisPaddingBottom,
|
|
141
|
+
smPaddingTop: thisSmPaddingTop,
|
|
142
|
+
smPaddingBottom: thisSmPaddingBottom
|
|
137
143
|
}, imageSet || imageSet2 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_SingleMessage.Media, {
|
|
138
144
|
doubleImage: doubleImage,
|
|
139
145
|
isPlaying: isPlaying,
|
|
@@ -16,7 +16,7 @@ var _loader = _interopRequireDefault(require("./assets/loader.svg"));
|
|
|
16
16
|
const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
17
17
|
displayName: "SingleMessagestyle__Container",
|
|
18
18
|
componentId: "sc-86zg20-0"
|
|
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 => {
|
|
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:", ";", ";padding-top:", ";padding-bottom:", ";}"], _ref => {
|
|
20
20
|
let {
|
|
21
21
|
theme,
|
|
22
22
|
backgroundColor
|
|
@@ -24,14 +24,14 @@ const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
|
24
24
|
return theme.color(backgroundColor);
|
|
25
25
|
}, _ref2 => {
|
|
26
26
|
let {
|
|
27
|
-
|
|
27
|
+
smPaddingTop
|
|
28
28
|
} = _ref2;
|
|
29
|
-
return
|
|
29
|
+
return smPaddingTop;
|
|
30
30
|
}, _ref3 => {
|
|
31
31
|
let {
|
|
32
|
-
|
|
32
|
+
smPaddingBottom
|
|
33
33
|
} = _ref3;
|
|
34
|
-
return
|
|
34
|
+
return smPaddingBottom;
|
|
35
35
|
}, _ref4 => {
|
|
36
36
|
let {
|
|
37
37
|
copyFirst
|
|
@@ -59,165 +59,175 @@ const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
|
59
59
|
fullImage
|
|
60
60
|
} = _ref8;
|
|
61
61
|
return landscapeVideo && hasVideo && !fullImage ? 'min-height: 0;' : null;
|
|
62
|
+
}, _ref9 => {
|
|
63
|
+
let {
|
|
64
|
+
paddingTop
|
|
65
|
+
} = _ref9;
|
|
66
|
+
return paddingTop;
|
|
67
|
+
}, _ref10 => {
|
|
68
|
+
let {
|
|
69
|
+
paddingBottom
|
|
70
|
+
} = _ref10;
|
|
71
|
+
return paddingBottom;
|
|
62
72
|
});
|
|
63
73
|
const Copy = exports.Copy = _styledComponents.default.div.withConfig({
|
|
64
74
|
displayName: "SingleMessagestyle__Copy",
|
|
65
75
|
componentId: "sc-86zg20-1"
|
|
66
|
-
})(["width:100%;", ";", ";padding:0 ", ";@media ", "{", ";", ";flex-direction:column;justify-content:center;padding:0 ", ";}", ";", ";"], (0, _zIndex.default)('low'),
|
|
76
|
+
})(["width:100%;", ";", ";padding:0 ", ";@media ", "{", ";", ";flex-direction:column;justify-content:center;padding:0 ", ";}", ";", ";"], (0, _zIndex.default)('low'), _ref11 => {
|
|
67
77
|
let {
|
|
68
78
|
hasVideo,
|
|
69
79
|
fullImage
|
|
70
|
-
} =
|
|
80
|
+
} = _ref11;
|
|
71
81
|
return hasVideo === true && fullImage === true ? 'display: none;' : null;
|
|
72
|
-
}, (0, _spacing.default)('l'),
|
|
82
|
+
}, (0, _spacing.default)('l'), _ref12 => {
|
|
73
83
|
let {
|
|
74
84
|
theme
|
|
75
|
-
} =
|
|
85
|
+
} = _ref12;
|
|
76
86
|
return theme.allBreakpoints('M');
|
|
77
|
-
},
|
|
87
|
+
}, _ref13 => {
|
|
78
88
|
let {
|
|
79
89
|
vhFull,
|
|
80
90
|
fullImage
|
|
81
|
-
} =
|
|
91
|
+
} = _ref13;
|
|
82
92
|
return vhFull || fullImage ? 'min-height: calc(100vh - 5.625rem); flex-direction: column; justify-content: center;' : 'height: auto;';
|
|
83
|
-
},
|
|
93
|
+
}, _ref14 => {
|
|
84
94
|
let {
|
|
85
95
|
hasVideo,
|
|
86
96
|
fullImage
|
|
87
|
-
} =
|
|
97
|
+
} = _ref14;
|
|
88
98
|
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%;}"],
|
|
99
|
+
}, (0, _spacing.default)('xl'), props => props.fullImage && (0, _styledComponents.css)(["@media ", "{position:absolute;width:100%;right:0;top:50%;transform:translateY(-50%);", " width:50%;}"], _ref15 => {
|
|
90
100
|
let {
|
|
91
101
|
theme
|
|
92
|
-
} =
|
|
102
|
+
} = _ref15;
|
|
93
103
|
return theme.allBreakpoints('M');
|
|
94
|
-
}, props.copyFirst ? (0, _styledComponents.css)(["left:0;"]) : null), props => props.hasImage ? (0, _styledComponents.css)(["@media ", "{width:50%;}"],
|
|
104
|
+
}, props.copyFirst ? (0, _styledComponents.css)(["left:0;"]) : null), props => props.hasImage ? (0, _styledComponents.css)(["@media ", "{width:50%;}"], _ref16 => {
|
|
95
105
|
let {
|
|
96
106
|
theme
|
|
97
|
-
} =
|
|
107
|
+
} = _ref16;
|
|
98
108
|
return theme.allBreakpoints('M');
|
|
99
|
-
}) : (0, _styledComponents.css)(["
|
|
109
|
+
}) : (0, _styledComponents.css)(["margin:auto;padding:0 ", ";@media ", "{width:100%;max-width ", ";padding:0 ", ";}"], (0, _spacing.default)('md'), _ref17 => {
|
|
100
110
|
let {
|
|
101
111
|
theme
|
|
102
|
-
} =
|
|
112
|
+
} = _ref17;
|
|
103
113
|
return theme.allBreakpoints('M');
|
|
104
|
-
}, _containers.default.small, (0, _spacing.default)('xl')
|
|
114
|
+
}, _containers.default.small, (0, _spacing.default)('xl')));
|
|
105
115
|
const Media = exports.Media = _styledComponents.default.div.withConfig({
|
|
106
116
|
displayName: "SingleMessagestyle__Media",
|
|
107
117
|
componentId: "sc-86zg20-2"
|
|
108
|
-
})(["width:100%;", ";@media ", "{height:auto;width:", ";", ";", ";}position:relative;", ";", ";@media ", "{padding-bottom:", ";}"],
|
|
118
|
+
})(["width:100%;", ";@media ", "{height:auto;width:", ";", ";", ";}position:relative;", ";", ";@media ", "{padding-bottom:", ";}"], _ref18 => {
|
|
109
119
|
let {
|
|
110
120
|
fullImage
|
|
111
|
-
} =
|
|
121
|
+
} = _ref18;
|
|
112
122
|
return fullImage ? 'height: 200px;' : 'height: 280px;';
|
|
113
|
-
},
|
|
123
|
+
}, _ref19 => {
|
|
114
124
|
let {
|
|
115
125
|
theme
|
|
116
|
-
} =
|
|
126
|
+
} = _ref19;
|
|
117
127
|
return theme.allBreakpoints('M');
|
|
118
|
-
},
|
|
128
|
+
}, _ref20 => {
|
|
119
129
|
let {
|
|
120
130
|
fullImage
|
|
121
|
-
} =
|
|
131
|
+
} = _ref20;
|
|
122
132
|
return fullImage ? '100%' : '50%';
|
|
123
|
-
},
|
|
133
|
+
}, _ref21 => {
|
|
124
134
|
let {
|
|
125
135
|
fullImage
|
|
126
|
-
} =
|
|
136
|
+
} = _ref21;
|
|
127
137
|
return fullImage ? 'min-height: 500px;' : null;
|
|
128
|
-
},
|
|
138
|
+
}, _ref22 => {
|
|
129
139
|
let {
|
|
130
140
|
vhFull,
|
|
131
141
|
fullImage
|
|
132
|
-
} =
|
|
142
|
+
} = _ref22;
|
|
133
143
|
return vhFull && fullImage ? 'min-height: calc(100vh - 5.625rem);' : null;
|
|
134
|
-
},
|
|
144
|
+
}, _ref23 => {
|
|
135
145
|
let {
|
|
136
146
|
doubleImage
|
|
137
|
-
} =
|
|
147
|
+
} = _ref23;
|
|
138
148
|
return doubleImage && 'display: flex; flex-direction: column';
|
|
139
|
-
},
|
|
149
|
+
}, _ref24 => {
|
|
140
150
|
let {
|
|
141
151
|
hasVideo
|
|
142
|
-
} =
|
|
152
|
+
} = _ref24;
|
|
143
153
|
return hasVideo ? 'height: auto; overflow: hidden; padding-bottom: 56.25%;' : null;
|
|
144
|
-
},
|
|
154
|
+
}, _ref25 => {
|
|
145
155
|
let {
|
|
146
156
|
theme
|
|
147
|
-
} =
|
|
157
|
+
} = _ref25;
|
|
148
158
|
return theme.allBreakpoints('M');
|
|
149
|
-
},
|
|
159
|
+
}, _ref26 => {
|
|
150
160
|
let {
|
|
151
161
|
landscapeVideo,
|
|
152
162
|
hasVideo
|
|
153
|
-
} =
|
|
163
|
+
} = _ref26;
|
|
154
164
|
return landscapeVideo && hasVideo ? 'calc(56.25% / 2);' : '0;';
|
|
155
165
|
});
|
|
156
166
|
const PlayButton = exports.PlayButton = _styledComponents.default.button.withConfig({
|
|
157
167
|
displayName: "SingleMessagestyle__PlayButton",
|
|
158
168
|
componentId: "sc-86zg20-3"
|
|
159
|
-
})(["", ";cursor:pointer;width:100%;height:100%;position:absolute;top:0;border:0;margin:0;padding:0;text-indent:-9999px;background:rgba(0,0,0,0) center no-repeat;background-size:70px;background-image:", ";", ";display:", ";&:focus,&:hover{background-image:", ";}@media ", "{background-size:100px;}"], (0, _zIndex.default)('medium'),
|
|
169
|
+
})(["", ";cursor:pointer;width:100%;height:100%;position:absolute;top:0;border:0;margin:0;padding:0;text-indent:-9999px;background:rgba(0,0,0,0) center no-repeat;background-size:70px;background-image:", ";", ";display:", ";&:focus,&:hover{background-image:", ";}@media ", "{background-size:100px;}"], (0, _zIndex.default)('medium'), _ref27 => {
|
|
160
170
|
let {
|
|
161
171
|
isBuffering
|
|
162
|
-
} =
|
|
172
|
+
} = _ref27;
|
|
163
173
|
return isBuffering === true ? `url(${_loader.default})` : `url(${_videoPlayIcon.default})`;
|
|
164
|
-
},
|
|
174
|
+
}, _ref28 => {
|
|
165
175
|
let {
|
|
166
176
|
copyFirst
|
|
167
|
-
} =
|
|
177
|
+
} = _ref28;
|
|
168
178
|
return copyFirst === true ? 'left: auto; right: 0;' : 'left: 0; right: auto;';
|
|
169
|
-
},
|
|
179
|
+
}, _ref29 => {
|
|
170
180
|
let {
|
|
171
181
|
isPlaying
|
|
172
|
-
} =
|
|
182
|
+
} = _ref29;
|
|
173
183
|
return isPlaying ? 'none' : 'block';
|
|
174
|
-
},
|
|
184
|
+
}, _ref30 => {
|
|
175
185
|
let {
|
|
176
186
|
isBuffering
|
|
177
|
-
} =
|
|
187
|
+
} = _ref30;
|
|
178
188
|
return isBuffering === true ? `url(${_loader.default})` : `url(${_videoPlayIcon__hover.default})`;
|
|
179
|
-
},
|
|
189
|
+
}, _ref31 => {
|
|
180
190
|
let {
|
|
181
191
|
theme
|
|
182
|
-
} =
|
|
192
|
+
} = _ref31;
|
|
183
193
|
return theme.allBreakpoints('M');
|
|
184
194
|
});
|
|
185
195
|
const Image = exports.Image = _styledComponents.default.div.withConfig({
|
|
186
196
|
displayName: "SingleMessagestyle__Image",
|
|
187
197
|
componentId: "sc-86zg20-4"
|
|
188
|
-
})(["@media ", "{img{position:", ";}}width:100%;height:100%;", ";", ";", ";"],
|
|
198
|
+
})(["@media ", "{img{position:", ";}}width:100%;height:100%;", ";", ";", ";"], _ref32 => {
|
|
189
199
|
let {
|
|
190
200
|
theme
|
|
191
|
-
} =
|
|
201
|
+
} = _ref32;
|
|
192
202
|
return theme.allBreakpoints('M');
|
|
193
|
-
},
|
|
203
|
+
}, _ref33 => {
|
|
194
204
|
let {
|
|
195
205
|
fullImage,
|
|
196
206
|
vhFull
|
|
197
|
-
} =
|
|
207
|
+
} = _ref33;
|
|
198
208
|
return fullImage || vhFull ? 'absolute' : null;
|
|
199
|
-
},
|
|
209
|
+
}, _ref34 => {
|
|
200
210
|
let {
|
|
201
211
|
doubleImage
|
|
202
|
-
} =
|
|
212
|
+
} = _ref34;
|
|
203
213
|
return doubleImage && 'height: 50%';
|
|
204
|
-
},
|
|
214
|
+
}, _ref35 => {
|
|
205
215
|
let {
|
|
206
216
|
isPlaying
|
|
207
|
-
} =
|
|
217
|
+
} = _ref35;
|
|
208
218
|
return isPlaying ? (0, _zIndex.default)('base') : (0, _zIndex.default)('low');
|
|
209
|
-
},
|
|
219
|
+
}, _ref36 => {
|
|
210
220
|
let {
|
|
211
221
|
hasVideo
|
|
212
|
-
} =
|
|
222
|
+
} = _ref36;
|
|
213
223
|
return hasVideo ? 'position: absolute; top: 0; left: 0;' : null;
|
|
214
224
|
});
|
|
215
225
|
const VideoWrapper = exports.VideoWrapper = _styledComponents.default.div.withConfig({
|
|
216
226
|
displayName: "SingleMessagestyle__VideoWrapper",
|
|
217
227
|
componentId: "sc-86zg20-5"
|
|
218
|
-
})(["width:100%;height:100%;position:absolute;top:0;left:0;", ";"],
|
|
228
|
+
})(["width:100%;height:100%;position:absolute;top:0;left:0;", ";"], _ref37 => {
|
|
219
229
|
let {
|
|
220
230
|
isPlaying
|
|
221
|
-
} =
|
|
231
|
+
} = _ref37;
|
|
222
232
|
return isPlaying ? (0, _zIndex.default)('medium') : (0, _zIndex.default)('base');
|
|
223
233
|
});
|
|
@@ -100,6 +100,8 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
100
100
|
-webkit-flex-direction: row;
|
|
101
101
|
-ms-flex-direction: row;
|
|
102
102
|
flex-direction: row;
|
|
103
|
+
padding-top: 0rem;
|
|
104
|
+
padding-bottom: 0rem;
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
|
|
@@ -408,6 +410,8 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
408
410
|
-webkit-flex-direction: row;
|
|
409
411
|
-ms-flex-direction: row;
|
|
410
412
|
flex-direction: row;
|
|
413
|
+
padding-top: 0rem;
|
|
414
|
+
padding-bottom: 0rem;
|
|
411
415
|
}
|
|
412
416
|
}
|
|
413
417
|
|
|
@@ -616,6 +620,8 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
616
620
|
-webkit-flex-direction: row;
|
|
617
621
|
-ms-flex-direction: row;
|
|
618
622
|
flex-direction: row;
|
|
623
|
+
padding-top: 0rem;
|
|
624
|
+
padding-bottom: 0rem;
|
|
619
625
|
}
|
|
620
626
|
}
|
|
621
627
|
|
|
@@ -961,6 +967,8 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
961
967
|
-webkit-flex-direction: row;
|
|
962
968
|
-ms-flex-direction: row;
|
|
963
969
|
flex-direction: row;
|
|
970
|
+
padding-top: 0rem;
|
|
971
|
+
padding-bottom: 0rem;
|
|
964
972
|
}
|
|
965
973
|
}
|
|
966
974
|
|
|
@@ -1157,6 +1165,8 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
1157
1165
|
-webkit-flex-direction: row;
|
|
1158
1166
|
-ms-flex-direction: row;
|
|
1159
1167
|
flex-direction: row;
|
|
1168
|
+
padding-top: 0rem;
|
|
1169
|
+
padding-bottom: 0rem;
|
|
1160
1170
|
}
|
|
1161
1171
|
}
|
|
1162
1172
|
|
|
@@ -1279,7 +1289,7 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1279
1289
|
z-index: 1;
|
|
1280
1290
|
padding: 0 2rem;
|
|
1281
1291
|
margin: auto;
|
|
1282
|
-
padding: 1rem;
|
|
1292
|
+
padding: 0 1rem;
|
|
1283
1293
|
}
|
|
1284
1294
|
|
|
1285
1295
|
@media (min-width:740px) {
|
|
@@ -1317,6 +1327,8 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1317
1327
|
-webkit-flex-direction: row;
|
|
1318
1328
|
-ms-flex-direction: row;
|
|
1319
1329
|
flex-direction: row;
|
|
1330
|
+
padding-top: 2rem;
|
|
1331
|
+
padding-bottom: 2rem;
|
|
1320
1332
|
}
|
|
1321
1333
|
}
|
|
1322
1334
|
|
package/package.json
CHANGED
|
@@ -32,7 +32,9 @@ const SingleMessage = ({
|
|
|
32
32
|
videoID = null,
|
|
33
33
|
landscapeVideo = false,
|
|
34
34
|
paddingTop = '2rem',
|
|
35
|
-
paddingBottom = '2rem'
|
|
35
|
+
paddingBottom = '2rem',
|
|
36
|
+
smPaddingTop = '2rem',
|
|
37
|
+
smPaddingBottom = '2rem'
|
|
36
38
|
}) => {
|
|
37
39
|
const hasImage = imageSet || false;
|
|
38
40
|
const doubleImage = (imageSet || image) && (imageSet2 || image2);
|
|
@@ -42,6 +44,8 @@ const SingleMessage = ({
|
|
|
42
44
|
// things looking nice in the CL; only using the new props where they want 'em:
|
|
43
45
|
const thisPaddingTop = hasImage || hasVideo ? '0rem' : paddingTop;
|
|
44
46
|
const thisPaddingBottom = hasImage || hasVideo ? '0rem' : paddingBottom;
|
|
47
|
+
const thisSmPaddingTop = hasImage || hasVideo ? '0rem' : smPaddingTop;
|
|
48
|
+
const thisSmPaddingBottom = hasImage || hasVideo ? '0rem' : smPaddingBottom;
|
|
45
49
|
|
|
46
50
|
// States to track video status
|
|
47
51
|
const [isInitialised, setIsInitialised] = useState(false);
|
|
@@ -147,6 +151,8 @@ const SingleMessage = ({
|
|
|
147
151
|
ref={thisRef}
|
|
148
152
|
paddingTop={thisPaddingTop}
|
|
149
153
|
paddingBottom={thisPaddingBottom}
|
|
154
|
+
smPaddingTop={thisSmPaddingTop}
|
|
155
|
+
smPaddingBottom={thisSmPaddingBottom}
|
|
150
156
|
>
|
|
151
157
|
{imageSet || imageSet2 ? (
|
|
152
158
|
<>
|
|
@@ -249,8 +255,9 @@ SingleMessage.propTypes = {
|
|
|
249
255
|
videoID: PropTypes.string,
|
|
250
256
|
landscapeVideo: PropTypes.bool,
|
|
251
257
|
paddingTop: PropTypes.string,
|
|
252
|
-
paddingBottom: PropTypes.string
|
|
253
|
-
|
|
258
|
+
paddingBottom: PropTypes.string,
|
|
259
|
+
smPaddingTop: PropTypes.string,
|
|
260
|
+
smPaddingBottom: PropTypes.string
|
|
254
261
|
};
|
|
255
262
|
|
|
256
263
|
export default SingleMessage;
|
|
@@ -12,8 +12,8 @@ const Container = styled.div`
|
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
overflow: hidden;
|
|
14
14
|
background: ${({ theme, backgroundColor }) => theme.color(backgroundColor)};
|
|
15
|
-
padding-top: ${({
|
|
16
|
-
padding-bottom: ${({
|
|
15
|
+
padding-top: ${({ smPaddingTop }) => smPaddingTop};
|
|
16
|
+
padding-bottom: ${({ smPaddingBottom }) => smPaddingBottom};
|
|
17
17
|
|
|
18
18
|
iframe {
|
|
19
19
|
height: 100%;
|
|
@@ -27,6 +27,8 @@ const Container = styled.div`
|
|
|
27
27
|
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
28
28
|
flex-direction: ${({ copyFirst }) => (copyFirst === true ? 'row-reverse' : 'row')};
|
|
29
29
|
${({ landscapeVideo, hasVideo, fullImage }) => (landscapeVideo && hasVideo && !fullImage ? 'min-height: 0;' : null)};
|
|
30
|
+
padding-top: ${({ paddingTop }) => paddingTop};
|
|
31
|
+
padding-bottom: ${({ paddingBottom }) => paddingBottom};
|
|
30
32
|
}
|
|
31
33
|
`;
|
|
32
34
|
|
|
@@ -64,19 +66,21 @@ const Copy = styled.div`
|
|
|
64
66
|
`};
|
|
65
67
|
|
|
66
68
|
${props => (props.hasImage
|
|
67
|
-
? css
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
? css`
|
|
70
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
71
|
+
width: 50%;
|
|
72
|
+
}
|
|
73
|
+
`
|
|
71
74
|
: css`
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
margin: auto;
|
|
76
|
+
padding: 0 ${spacing('md')};
|
|
77
|
+
|
|
78
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
79
|
+
width: 100%;
|
|
80
|
+
max-width ${containers.small};
|
|
81
|
+
padding: 0 ${spacing('xl')};
|
|
82
|
+
}
|
|
83
|
+
`)};
|
|
80
84
|
`;
|
|
81
85
|
|
|
82
86
|
const Media = styled.div`
|
|
@@ -100,6 +100,8 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
100
100
|
-webkit-flex-direction: row;
|
|
101
101
|
-ms-flex-direction: row;
|
|
102
102
|
flex-direction: row;
|
|
103
|
+
padding-top: 0rem;
|
|
104
|
+
padding-bottom: 0rem;
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
|
|
@@ -408,6 +410,8 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
408
410
|
-webkit-flex-direction: row;
|
|
409
411
|
-ms-flex-direction: row;
|
|
410
412
|
flex-direction: row;
|
|
413
|
+
padding-top: 0rem;
|
|
414
|
+
padding-bottom: 0rem;
|
|
411
415
|
}
|
|
412
416
|
}
|
|
413
417
|
|
|
@@ -616,6 +620,8 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
616
620
|
-webkit-flex-direction: row;
|
|
617
621
|
-ms-flex-direction: row;
|
|
618
622
|
flex-direction: row;
|
|
623
|
+
padding-top: 0rem;
|
|
624
|
+
padding-bottom: 0rem;
|
|
619
625
|
}
|
|
620
626
|
}
|
|
621
627
|
|
|
@@ -961,6 +967,8 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
961
967
|
-webkit-flex-direction: row;
|
|
962
968
|
-ms-flex-direction: row;
|
|
963
969
|
flex-direction: row;
|
|
970
|
+
padding-top: 0rem;
|
|
971
|
+
padding-bottom: 0rem;
|
|
964
972
|
}
|
|
965
973
|
}
|
|
966
974
|
|
|
@@ -1157,6 +1165,8 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
1157
1165
|
-webkit-flex-direction: row;
|
|
1158
1166
|
-ms-flex-direction: row;
|
|
1159
1167
|
flex-direction: row;
|
|
1168
|
+
padding-top: 0rem;
|
|
1169
|
+
padding-bottom: 0rem;
|
|
1160
1170
|
}
|
|
1161
1171
|
}
|
|
1162
1172
|
|
|
@@ -1279,7 +1289,7 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1279
1289
|
z-index: 1;
|
|
1280
1290
|
padding: 0 2rem;
|
|
1281
1291
|
margin: auto;
|
|
1282
|
-
padding: 1rem;
|
|
1292
|
+
padding: 0 1rem;
|
|
1283
1293
|
}
|
|
1284
1294
|
|
|
1285
1295
|
@media (min-width:740px) {
|
|
@@ -1317,6 +1327,8 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1317
1327
|
-webkit-flex-direction: row;
|
|
1318
1328
|
-ms-flex-direction: row;
|
|
1319
1329
|
flex-direction: row;
|
|
1330
|
+
padding-top: 2rem;
|
|
1331
|
+
padding-bottom: 2rem;
|
|
1320
1332
|
}
|
|
1321
1333
|
}
|
|
1322
1334
|
|