|
1 | 1 | import { css } from '@emotion/react';
|
2 | 2 | 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'; |
4 | 7 | import {
|
5 | 8 | ArticleDesign,
|
6 | 9 | ArticleDisplay,
|
7 | 10 | getAllThemes,
|
| 11 | + Pillar, |
8 | 12 | } from '../lib/articleFormat';
|
| 13 | +import { palette } from '../palette'; |
9 | 14 | import { SubMeta } from './SubMeta';
|
10 | 15 |
|
11 | 16 | export default {
|
@@ -74,7 +79,46 @@ export const StandardStory = ({ format }: StoryProps) => {
|
74 | 79 | );
|
75 | 80 | };
|
76 | 81 | 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 | +}; |
78 | 122 |
|
79 | 123 | const allDeadBlogThemes = getAllThemes({
|
80 | 124 | display: ArticleDisplay.Standard,
|
|
0 commit comments