Skip to content

Commit

Permalink
Add new CardPicture image size
Browse files Browse the repository at this point in the history
  • Loading branch information
domlander committed Jan 22, 2025
1 parent 79491fc commit 9105220
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type ImageSizeType =
| 'large'
| 'jumbo'
| 'carousel'
| 'podcast'
| 'feature'
| 'feature-large';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const getIconSizeOnDesktop = (imageSize: ImageSizeType) => {
switch (imageSize) {
case 'jumbo':
case 'large':
case 'podcast':
case 'carousel':
case 'medium':
case 'feature':
Expand Down
3 changes: 3 additions & 0 deletions dotcom-rendering/src/components/CardPicture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const decideImageWidths = (
// { breakpoint: breakpoints.desktop, width: 140 },
// ];

case 'podcast':
return [{ breakpoint: breakpoints.mobile, width: 80 }];

case 'carousel':
return [{ breakpoint: breakpoints.mobile, width: 220 }];

Expand Down

0 comments on commit 9105220

Please sign in to comment.