From 462f23882daa1d08fad82da0d145f0d56a273e11 Mon Sep 17 00:00:00 2001 From: Anna Beddow Date: Thu, 31 Oct 2024 16:21:01 +0000 Subject: [PATCH] Add in trailtext --- .../components/Card/components/TrailText.tsx | 4 +- .../src/components/FeatureCard.tsx | 101 ++++++++++-------- dotcom-rendering/src/palette.ts | 4 + 3 files changed, 62 insertions(+), 47 deletions(-) diff --git a/dotcom-rendering/src/components/Card/components/TrailText.tsx b/dotcom-rendering/src/components/Card/components/TrailText.tsx index 25717b5dbd..c1466ca531 100644 --- a/dotcom-rendering/src/components/Card/components/TrailText.tsx +++ b/dotcom-rendering/src/components/Card/components/TrailText.tsx @@ -18,7 +18,7 @@ type Props = { /** Controls visibility of trail text on various breakpoints */ hideUntil?: 'tablet' | 'desktop'; /** Adds padding to the top of the trail text */ - padTop: boolean; + padTop?: boolean; }; const trailTextStyles = css` @@ -46,7 +46,7 @@ export const TrailText = ({ trailTextSize = 'regular', trailTextColour = palette('--card-trail-text'), hideUntil, - padTop, + padTop = false, }: Props) => { const trailText = (
)} -
- - + + + {starRating !== undefined ? ( + - {starRating !== undefined ? ( - - ) : null} - + ) : null} + + {!!trailText && ( + + )} sourcePalette.neutral[86], + dark: () => sourcePalette.neutral[20], + }, '--filter-key-events-toggle-border-top': { light: () => sourcePalette.neutral[86], dark: () => sourcePalette.neutral[20],