Skip to content

Commit 3effa58

Browse files
committed
Dont show card grey bonding box when no image
1 parent bc71031 commit 3effa58

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,3 +1714,51 @@ export const WithAVerticalGapWhenScrollableSmallContainer = () => {
17141714
</>
17151715
);
17161716
};
1717+
1718+
export const WithBetaContainerAndSublinks = () => {
1719+
return (
1720+
<CardGroup>
1721+
{/* With an image */}
1722+
<CardWrapper>
1723+
<Card
1724+
{...basicCardProps}
1725+
image={undefined}
1726+
containerType="flexible/general"
1727+
imagePositionOnMobile="bottom"
1728+
supportingContent={[
1729+
{
1730+
...aBasicLink,
1731+
headline: 'Headline 1',
1732+
kickerText: 'Kicker',
1733+
},
1734+
{
1735+
...aBasicLink,
1736+
headline: 'Headline 2',
1737+
kickerText: 'Kicker',
1738+
},
1739+
]}
1740+
/>
1741+
</CardWrapper>
1742+
{/* Without an image */}
1743+
<CardWrapper>
1744+
<Card
1745+
{...basicCardProps}
1746+
containerType="flexible/general"
1747+
imagePositionOnMobile="bottom"
1748+
supportingContent={[
1749+
{
1750+
...aBasicLink,
1751+
headline: 'Headline 1',
1752+
kickerText: 'Kicker',
1753+
},
1754+
{
1755+
...aBasicLink,
1756+
headline: 'Headline 2',
1757+
kickerText: 'Kicker',
1758+
},
1759+
]}
1760+
/>
1761+
</CardWrapper>
1762+
</CardGroup>
1763+
);
1764+
};

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,9 @@ export const Card = ({
693693
isDynamo={isDynamo}
694694
fillBackgroundOnMobile={
695695
!!isFlexSplash ||
696-
(isBetaContainer && imagePositionOnMobile === 'bottom')
696+
(isBetaContainer &&
697+
!!image &&
698+
imagePositionOnMobile === 'bottom')
697699
}
698700
/>
699701
);

0 commit comments

Comments
 (0)