File tree Expand file tree Collapse file tree 4 files changed +63
-5
lines changed
dotcom-rendering/src/layouts Expand file tree Collapse file tree 4 files changed +63
-5
lines changed Original file line number Diff line number Diff line change 11import type { Meta , StoryObj } from '@storybook/react-webpack5' ;
22import { allModes } from '../../.storybook/modes' ;
3- import { HostedLayout } from './HostedLayout ' ;
3+ import { HostedArticleLayout } from './HostedArticleLayout ' ;
44
55const 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
1717export default meta ;
1818
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff line change 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+ } ;
You can’t perform that action at this time.
0 commit comments