Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure flexible general is counted as a flexible container in card component #12451

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions dotcom-rendering/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,11 @@ export const Card = ({
const hasBackgroundColour = !containerPalette && isMediaCard(format);

/* Whilst we migrate to the new container types, we need to check which container we are in. */
const isFlexibleContainer = containerType === 'flexible/special';
const isFlexibleContainer =
containerType === 'flexible/special' ||
containerType === 'flexible/general';

const isFlexibleSpecialContainer = containerType === 'flexible/special';

const headlinePosition =
isFlexSplash && isFlexibleContainer ? 'outer' : 'inner';
Expand Down Expand Up @@ -450,8 +454,8 @@ export const Card = ({
return (
<CardWrapper
format={format}
showTopBar={!isOnwardContent && !isFlexibleContainer}
showMobileTopBar={isFlexibleContainer}
showTopBar={!isOnwardContent && !isFlexibleSpecialContainer}
showMobileTopBar={isFlexibleSpecialContainer}
containerPalette={containerPalette}
isOnwardContent={isOnwardContent}
>
Expand Down
Loading