Skip to content

Commit 1faf09e

Browse files
committed
Restore behaviour for old containers
1 parent 23b9708 commit 1faf09e

File tree

1 file changed

+35
-3
lines changed
  • dotcom-rendering/src/components/Card

1 file changed

+35
-3
lines changed

dotcom-rendering/src/components/Card/Card.tsx

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,40 @@ const HorizontalDivider = () => (
228228
);
229229

230230
const podcastImageStyles = (
231+
imageSize: MediaSizeType,
232+
isBetaContainer: boolean,
231233
fixImageWidth: boolean,
232234
imagePositionOnDesktop: MediaPositionType,
233235
) => {
236+
if (!isBetaContainer) {
237+
switch (imageSize) {
238+
case 'small':
239+
return css`
240+
width: 69px;
241+
height: 69px;
242+
${from.tablet} {
243+
width: 98px;
244+
height: 98px;
245+
}
246+
`;
247+
248+
case 'medium':
249+
return css`
250+
width: 98px;
251+
height: 98px;
252+
${from.tablet} {
253+
width: 120px;
254+
height: 120px;
255+
}
256+
`;
257+
default:
258+
return css`
259+
width: 120px;
260+
height: 120px;
261+
`;
262+
}
263+
}
264+
234265
if (fixImageWidth) {
235266
return css`
236267
width: 69px;
@@ -912,9 +943,8 @@ export const Card = ({
912943
mediaPositionOnMobile={mediaPositionOnMobile}
913944
fixImageWidth={
914945
fixImageWidth ??
915-
(!isBetaContainer &&
916-
(mediaPositionOnMobile === 'left' ||
917-
mediaPositionOnMobile === 'right'))
946+
(mediaPositionOnMobile === 'left' ||
947+
mediaPositionOnMobile === 'right')
918948
}
919949
hideImageOverlay={media.type === 'slideshow'}
920950
padMedia={isMediaCardOrNewsletter && isBetaContainer}
@@ -1126,6 +1156,8 @@ export const Card = ({
11261156
{media.podcastImage?.src && !showKickerImage ? (
11271157
<div
11281158
css={podcastImageStyles(
1159+
mediaSize,
1160+
isBetaContainer,
11291161
!!fixImageWidth,
11301162
mediaPositionOnDesktop,
11311163
)}

0 commit comments

Comments
 (0)