Skip to content

Commit b6b1c63

Browse files
authored
Use the news palette for special report and special report alt in highlights (#15009)
* Use the `news` palette for `special report` and `special report alt` paletted highlight cards. This has been requested by design and editorial * Add a special report card to the highlights story
1 parent b574910 commit b6b1c63

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

dotcom-rendering/src/components/Masthead/HighlightsCard.stories.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { css } from '@emotion/react';
2+
import { ArticleSpecial } from '@guardian/libs';
23
import { from } from '@guardian/source/foundations';
34
import type { Meta, StoryObj } from '@storybook/react-webpack5';
5+
import type { ArticleTheme } from '../../lib/articleFormat';
46
import { ArticleDesign, ArticleDisplay, Pillar } from '../../lib/articleFormat';
57
import type { MainMedia } from '../../types/mainMedia';
68
import { HighlightsCard } from './HighlightsCard';
@@ -68,7 +70,7 @@ export const WithQuotes: Story = {
6870
showQuotedHeadline: true,
6971
},
7072
render: (args) => {
71-
const Card = ({ pillar }: { pillar: Pillar }) => (
73+
const Card = ({ pillar }: { pillar: ArticleTheme }) => (
7274
<CardWrapper>
7375
<HighlightsCard
7476
{...args}
@@ -88,6 +90,7 @@ export const WithQuotes: Story = {
8890
<Card pillar={Pillar.Sport} />
8991
<Card pillar={Pillar.Culture} />
9092
<Card pillar={Pillar.Lifestyle} />
93+
<Card pillar={ArticleSpecial.SpecialReport} />
9194
</>
9295
);
9396
},

dotcom-rendering/src/paletteDeclarations.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5873,9 +5873,8 @@ const highlightsCardKickerTextDark: PaletteFunction = (format) => {
58735873
case ArticleSpecial.Labs:
58745874
return sourcePalette.labs[200];
58755875
case ArticleSpecial.SpecialReport:
5876-
return sourcePalette.news[400];
58775876
case ArticleSpecial.SpecialReportAlt:
5878-
return sourcePalette.specialReportAlt[200];
5877+
return sourcePalette.news[500];
58795878
}
58805879
};
58815880

@@ -5890,9 +5889,8 @@ const highlightsCardBackgroudLight: PaletteFunction = (format) => {
58905889
case ArticleSpecial.Labs:
58915890
return sourcePalette.labs[200];
58925891
case ArticleSpecial.SpecialReport:
5893-
return sourcePalette.news[400];
58945892
case ArticleSpecial.SpecialReportAlt:
5895-
return sourcePalette.specialReportAlt[200];
5893+
return sourcePalette.news[800];
58965894
}
58975895
};
58985896
const highlightsCardBackgroundDark: PaletteFunction = () =>
@@ -5909,9 +5907,8 @@ const highlightsCardHeadlineLight: PaletteFunction = (format) => {
59095907
case ArticleSpecial.Labs:
59105908
return sourcePalette.labs[200];
59115909
case ArticleSpecial.SpecialReport:
5912-
return sourcePalette.news[400];
59135910
case ArticleSpecial.SpecialReportAlt:
5914-
return sourcePalette.specialReportAlt[200];
5911+
return sourcePalette.news[400];
59155912
}
59165913
};
59175914
const highlightsCardHeadlineDark: PaletteFunction = () =>
@@ -5928,9 +5925,8 @@ const highlightsCardQuoteIconLight: PaletteFunction = (format) => {
59285925
case ArticleSpecial.Labs:
59295926
return sourcePalette.labs[200];
59305927
case ArticleSpecial.SpecialReport:
5931-
return sourcePalette.news[400];
59325928
case ArticleSpecial.SpecialReportAlt:
5933-
return sourcePalette.specialReportAlt[200];
5929+
return sourcePalette.news[400];
59345930
}
59355931
};
59365932
const highlightsCardQuoteIconDark: PaletteFunction = () =>

0 commit comments

Comments
 (0)