Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion dotcom-rendering/src/layouts/DecideLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { FullPageInteractiveLayout } from './FullPageInteractiveLayout';
import { GalleryLayout } from './GalleryLayout';
import { HostedArticleLayout } from './HostedArticleLayout';
import { HostedGalleryLayout } from './HostedGalleryLayout';
import { HostedVideoLayout } from './HostedVideoLayout';
import { ImmersiveLayout } from './ImmersiveLayout';
import { InteractiveLayout } from './InteractiveLayout';
import { LiveLayout } from './LiveLayout';
Expand Down Expand Up @@ -363,14 +364,21 @@ const DecideLayoutWeb = ({ article, NAV, renderingTarget }: WebProps) => {
/>
);
case ArticleDesign.HostedArticle:
case ArticleDesign.HostedVideo:
return (
<HostedArticleLayout
content={article}
format={format}
renderingTarget={renderingTarget}
/>
);
case ArticleDesign.HostedVideo:
return (
<HostedVideoLayout
content={article}
format={format}
renderingTarget={renderingTarget}
/>
);
case ArticleDesign.HostedGallery:
return (
<HostedGalleryLayout
Expand Down
64 changes: 64 additions & 0 deletions dotcom-rendering/src/layouts/HostedVideoLayout.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import type { Meta, StoryObj } from '@storybook/react-webpack5';
import { allModes } from '../../.storybook/modes';
import { hostedVideo } from '../../fixtures/manual/hostedVideo';
import {
ArticleDesign,
ArticleDisplay,
ArticleSpecial,
} from '../lib/articleFormat';
import { enhanceArticleType } from '../types/article';
import { HostedVideoLayout } from './HostedVideoLayout';

const meta = {
title: 'Layouts/HostedVideo',
component: HostedVideoLayout,
parameters: {
chromatic: {
modes: {
'light leftCol': allModes['light leftCol'],
},
},
},
} satisfies Meta<typeof HostedVideoLayout>;

export default meta;

type Story = StoryObj<typeof meta>;

const format = {
theme: ArticleSpecial.Labs,
design: ArticleDesign.HostedVideo,
display: ArticleDisplay.Standard,
};

export const Apps = {
args: {
content: enhanceArticleType(hostedVideo, 'Apps'),
format,
renderingTarget: 'Apps',
},
parameters: {
config: {
renderingTarget: 'Apps',
darkModeAvailable: true,
},
chromatic: {
modes: {
'light mobileMedium': allModes['light mobileMedium'],
},
},
},
} satisfies Story;

export const Web = {
args: {
content: enhanceArticleType(hostedVideo, 'Web'),
format,
renderingTarget: 'Web',
},
parameters: {
config: {
renderingTarget: 'Web',
},
},
} satisfies Story;
Loading
Loading