Skip to content

Commit c26190f

Browse files
committed
add gallery story for sub meta
1 parent cf0df3c commit c26190f

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

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

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { css } from '@emotion/react';
22
import type { StoryProps } from '../../.storybook/decorators/splitThemeDecorator';
3-
import { splitTheme } from '../../.storybook/decorators/splitThemeDecorator';
3+
import {
4+
defaultFormats,
5+
splitTheme,
6+
} from '../../.storybook/decorators/splitThemeDecorator';
47
import {
58
ArticleDesign,
69
ArticleDisplay,
710
getAllThemes,
11+
Pillar,
812
} from '../lib/articleFormat';
13+
import { palette } from '../palette';
914
import { SubMeta } from './SubMeta';
1015

1116
export default {
@@ -74,7 +79,46 @@ export const StandardStory = ({ format }: StoryProps) => {
7479
);
7580
};
7681
StandardStory.storyName = 'Standard - All pillars';
77-
StandardStory.decorators = [splitTheme()];
82+
StandardStory.decorators = [
83+
splitTheme(
84+
[...defaultFormats].filter(
85+
(format) => format.design !== ArticleDesign.Gallery,
86+
),
87+
),
88+
];
89+
90+
export const GalleryStory = ({ format }: StoryProps) => {
91+
return (
92+
<SubMeta
93+
format={format}
94+
subMetaKeywordLinks={subMetaKeywordLinks}
95+
subMetaSectionLinks={subMetaSectionLinks}
96+
pageId=""
97+
webUrl=""
98+
webTitle=""
99+
showBottomSocialButtons={false} // Galelries do not have bottom social buttons
100+
/>
101+
);
102+
};
103+
GalleryStory.storyName = 'Gallery - All pillars';
104+
GalleryStory.decorators = [
105+
splitTheme(
106+
[
107+
{
108+
display: ArticleDisplay.Standard,
109+
design: ArticleDesign.Gallery,
110+
theme: Pillar.News,
111+
},
112+
],
113+
{ orientation: 'vertical' },
114+
),
115+
];
116+
GalleryStory.parameters = {
117+
colourSchemeBackground: {
118+
light: palette('--article-background'),
119+
dark: palette('--article-background'),
120+
},
121+
};
78122

79123
const allDeadBlogThemes = getAllThemes({
80124
display: ArticleDisplay.Standard,

0 commit comments

Comments
 (0)