Skip to content

Commit 37487ec

Browse files
committed
use the default theme in LabsSectionHeader story for the split theme decorator
1 parent bb4c225 commit 37487ec

2 files changed

Lines changed: 8 additions & 15 deletions

File tree

dotcom-rendering/.storybook/decorators/splitThemeDecorator.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ interface Orientation {
2222
}
2323

2424
type SplitThemeOptions = Orientation & {
25+
/** Allows the format heading to be omitted on the split theme decorator */
2526
hideFormatHeading?: boolean;
2627
};
2728

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

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import { css } from '@emotion/react';
22
import { from } from '@guardian/source/foundations';
33
import type { Meta, StoryObj } from '@storybook/react';
44
import { userEvent, within } from '@storybook/test';
5-
import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator';
65
import {
7-
ArticleDesign,
8-
ArticleDisplay,
9-
ArticleSpecial,
10-
} from '../lib/articleFormat';
6+
defaultFormats,
7+
splitTheme,
8+
} from '../../.storybook/decorators/splitThemeDecorator';
119
import { LabsSectionHeader } from './LabsSectionHeader';
1210

1311
const meta = {
@@ -33,16 +31,10 @@ const meta = {
3331
</div>
3432
),
3533
decorators: [
36-
splitTheme(
37-
[
38-
{
39-
theme: ArticleSpecial.Labs,
40-
design: ArticleDesign.Feature,
41-
display: ArticleDisplay.Standard,
42-
},
43-
],
44-
{ orientation: 'vertical', hideFormatHeading: true },
45-
),
34+
splitTheme([defaultFormats[0]], {
35+
orientation: 'vertical',
36+
hideFormatHeading: true,
37+
}),
4638
],
4739
} satisfies Meta<typeof LabsSectionHeader>;
4840
export default meta;

0 commit comments

Comments
 (0)