|
| 1 | +import type { Meta, StoryObj } from '@storybook/react-webpack5'; |
| 2 | +import { allModes } from '../../.storybook/modes'; |
| 3 | +import { hostedVideo } from '../../fixtures/manual/hostedVideo'; |
| 4 | +import { |
| 5 | + ArticleDesign, |
| 6 | + ArticleDisplay, |
| 7 | + ArticleSpecial, |
| 8 | +} from '../lib/articleFormat'; |
| 9 | +import { enhanceArticleType } from '../types/article'; |
| 10 | +import { HostedVideoLayout } from './HostedVideoLayout'; |
| 11 | + |
| 12 | +const meta = { |
| 13 | + title: 'Layouts/HostedVideo', |
| 14 | + component: HostedVideoLayout, |
| 15 | + parameters: { |
| 16 | + chromatic: { |
| 17 | + modes: { |
| 18 | + 'light leftCol': allModes['light leftCol'], |
| 19 | + }, |
| 20 | + }, |
| 21 | + }, |
| 22 | +} satisfies Meta<typeof HostedVideoLayout>; |
| 23 | + |
| 24 | +export default meta; |
| 25 | + |
| 26 | +type Story = StoryObj<typeof meta>; |
| 27 | + |
| 28 | +const format = { |
| 29 | + theme: ArticleSpecial.Labs, |
| 30 | + design: ArticleDesign.HostedVideo, |
| 31 | + display: ArticleDisplay.Standard, |
| 32 | +}; |
| 33 | + |
| 34 | +export const Apps = { |
| 35 | + args: { |
| 36 | + content: enhanceArticleType(hostedVideo, 'Apps'), |
| 37 | + format, |
| 38 | + renderingTarget: 'Apps', |
| 39 | + }, |
| 40 | + parameters: { |
| 41 | + config: { |
| 42 | + renderingTarget: 'Apps', |
| 43 | + darkModeAvailable: true, |
| 44 | + }, |
| 45 | + chromatic: { |
| 46 | + modes: { |
| 47 | + 'light mobileMedium': allModes['light mobileMedium'], |
| 48 | + }, |
| 49 | + }, |
| 50 | + }, |
| 51 | +} satisfies Story; |
| 52 | + |
| 53 | +export const Web = { |
| 54 | + args: { |
| 55 | + content: enhanceArticleType(hostedVideo, 'Web'), |
| 56 | + format, |
| 57 | + renderingTarget: 'Web', |
| 58 | + }, |
| 59 | + parameters: { |
| 60 | + config: { |
| 61 | + renderingTarget: 'Web', |
| 62 | + }, |
| 63 | + }, |
| 64 | +} satisfies Story; |
0 commit comments