Skip to content

Commit 0e86aaf

Browse files
committed
add very basic gallery scaffold
1 parent 77cfa77 commit 0e86aaf

File tree

4 files changed

+63
-5
lines changed

4 files changed

+63
-5
lines changed

dotcom-rendering/src/layouts/HostedLayout.stories.tsx renamed to dotcom-rendering/src/layouts/HostedArticleLayout.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import type { Meta, StoryObj } from '@storybook/react-webpack5';
22
import { allModes } from '../../.storybook/modes';
3-
import { HostedLayout } from './HostedLayout';
3+
import { HostedArticleLayout } from './HostedArticleLayout';
44

55
const meta = {
6-
title: 'Layouts/Hosted',
7-
component: HostedLayout,
6+
title: 'Layouts/HostedArticle',
7+
component: HostedArticleLayout,
88
parameters: {
99
chromatic: {
1010
modes: {
1111
'light leftCol': allModes['light leftCol'],
1212
},
1313
},
1414
},
15-
} satisfies Meta<typeof HostedLayout>;
15+
} satisfies Meta<typeof HostedArticleLayout>;
1616

1717
export default meta;
1818

dotcom-rendering/src/layouts/HostedLayout.tsx renamed to dotcom-rendering/src/layouts/HostedArticleLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const border = css`
1818
border: 1px solid black;
1919
`;
2020

21-
export const HostedLayout = (props: WebProps | AppProps) => {
21+
export const HostedArticleLayout = (props: WebProps | AppProps) => {
2222
return (
2323
<>
2424
{props.renderingTarget === 'Web' ? 'Masthead' : null}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import type { Meta, StoryObj } from '@storybook/react-webpack5';
2+
import { allModes } from '../../.storybook/modes';
3+
import { HostedGalleryLayout } from './HostedGalleryLayout';
4+
5+
const meta = {
6+
title: 'Layouts/HostedGallery',
7+
component: HostedGalleryLayout,
8+
parameters: {
9+
chromatic: {
10+
modes: {
11+
'light leftCol': allModes['light leftCol'],
12+
},
13+
},
14+
},
15+
} satisfies Meta<typeof HostedGalleryLayout>;
16+
17+
export default meta;
18+
19+
type Story = StoryObj<typeof meta>;
20+
21+
export const Apps = {
22+
args: {
23+
renderingTarget: 'Apps',
24+
},
25+
parameters: {
26+
config: {
27+
renderingTarget: 'Apps',
28+
},
29+
},
30+
} satisfies Story;
31+
32+
export const Web = {
33+
args: {
34+
renderingTarget: 'Web',
35+
},
36+
parameters: {
37+
config: {
38+
renderingTarget: 'Web',
39+
},
40+
},
41+
} satisfies Story;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { RenderingTarget } from 'src/types/renderingTarget';
2+
3+
interface Props {
4+
renderingTarget: RenderingTarget;
5+
}
6+
7+
interface WebProps extends Props {
8+
renderingTarget: 'Web';
9+
}
10+
11+
interface AppProps extends Props {
12+
renderingTarget: 'Apps';
13+
}
14+
15+
export const HostedGalleryLayout = (props: WebProps | AppProps) => {
16+
return <div>Hosted gallery</div>;
17+
};

0 commit comments

Comments
 (0)