Skip to content

Commit 90187de

Browse files
committed
Add stories. Update space for live updates
1 parent e21ae47 commit 90187de

File tree

2 files changed

+39
-5
lines changed

2 files changed

+39
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ export const Card = ({
666666
imagePositionOnMobile === 'bottom'
667667
) {
668668
return {
669-
row: 'tiny',
669+
row: showLivePlayable ? 'small' : 'tiny',
670670
column: 'large',
671671
};
672672
}

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

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const splashCard = {
3939
kickerText: 'Kicker for splash card',
4040
};
4141

42-
/** This creates a list of 8 standard cards which contain:
42+
/**
43+
* This creates a list of 8 standard cards which contain:
4344
* - a card with sublinks
4445
* - a media card
4546
* - a boosted card
@@ -173,13 +174,17 @@ export default meta;
173174
type Story = StoryObj<typeof meta>;
174175

175176
export const SplashWithStandards: Story = {
176-
name: 'Splash with standard cards',
177+
name: 'Splash with big and standard cards',
177178
args: {
178-
frontSectionTitle: 'Splash with stardards',
179+
frontSectionTitle: 'Splash with standards',
179180
groupedTrails: {
180181
...emptyGroupedTrails,
181182
splash: [{ ...splashCard, supportingContent: [] }],
182-
standard: standardCards,
183+
standard: standardCards.map((card, index) => ({
184+
...card,
185+
isBoosted: index === 0,
186+
boostLevel: index === 0 ? 'boost' : 'default',
187+
})),
183188
},
184189
},
185190
};
@@ -415,6 +420,35 @@ export const SplashWithLiveUpdates: Story = {
415420
},
416421
};
417422

423+
export const BigWithLiveUpdates: Story = {
424+
name: 'Big with live updates',
425+
args: {
426+
groupedTrails: {
427+
...emptyGroupedTrails,
428+
splash: [{ ...splashCard, image: undefined }],
429+
},
430+
},
431+
render: (args) => {
432+
global.fetch = mockLatestLinksReqFetch;
433+
return (
434+
<FrontSection
435+
title="Boosted"
436+
discussionApiUrl={discussionApiUrl}
437+
editionId="UK"
438+
showTopBorder={true}
439+
>
440+
<FlexibleGeneral
441+
{...args}
442+
groupedTrails={{
443+
...emptyGroupedTrails,
444+
standard: [{ ...liveUpdatesCard, boostLevel: 'boost' }],
445+
}}
446+
/>
447+
</FrontSection>
448+
);
449+
},
450+
};
451+
418452
const slideshowCard = {
419453
...liveUpdatesCard,
420454
mainMedia: undefined,

0 commit comments

Comments
 (0)