From a1a8004ad951f990e86abd5442231c64c8dfabb7 Mon Sep 17 00:00:00 2001 From: Anna Beddow Date: Mon, 6 Jan 2025 11:39:10 +0000 Subject: [PATCH] Add kicker image option to flex special and general --- dotcom-rendering/src/components/FlexibleGeneral.tsx | 7 ++++++- dotcom-rendering/src/components/FlexibleSpecial.tsx | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dotcom-rendering/src/components/FlexibleGeneral.tsx b/dotcom-rendering/src/components/FlexibleGeneral.tsx index c13a3a5cd2..8fd791f5ee 100644 --- a/dotcom-rendering/src/components/FlexibleGeneral.tsx +++ b/dotcom-rendering/src/components/FlexibleGeneral.tsx @@ -1,3 +1,4 @@ +import { ArticleDesign } from 'src/lib/articleFormat'; import { isMediaCard } from '../lib/cardHelpers'; import { palette } from '../palette'; import type { BoostLevel } from '../types/content'; @@ -224,6 +225,7 @@ export const SplashCardLayout = ({ showTopBarMobile={true} trailTextSize={trailTextSize} canPlayInline={true} + showKickerImage={card.format.design === ArticleDesign.Audio} /> @@ -336,6 +338,7 @@ export const BoostedCardLayout = ({ showTopBarMobile={true} liveUpdatesPosition={liveUpdatesPosition} canPlayInline={true} + showKickerImage={card.format.design === ArticleDesign.Audio} /> @@ -403,7 +406,9 @@ export const StandardCardLayout = ({ )} supportingContentAlignment="vertical" supportingContentPosition="outer" - imageSize={'medium'} + imageSize={ + isMediaCard(card.format) ? 'small' : 'medium' + } aspectRatio={aspectRatio} kickerText={card.kickerText} showLivePlayable={false} diff --git a/dotcom-rendering/src/components/FlexibleSpecial.tsx b/dotcom-rendering/src/components/FlexibleSpecial.tsx index 9b09bb367a..3375956593 100644 --- a/dotcom-rendering/src/components/FlexibleSpecial.tsx +++ b/dotcom-rendering/src/components/FlexibleSpecial.tsx @@ -1,3 +1,4 @@ +import { ArticleDesign } from 'src/lib/articleFormat'; import { isMediaCard } from '../lib/cardHelpers'; import type { BoostLevel } from '../types/content'; import type { @@ -167,6 +168,7 @@ export const OneCardLayout = ({ showTopBarMobile={true} trailTextSize={trailTextSize} canPlayInline={true} + showKickerImage={card.format.design === ArticleDesign.Audio} />