-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
825 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
dotcom-rendering/src/components/AudioPlayer/AudioPlayer.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { defaultFormats } from '../../../.storybook/decorators/splitThemeDecorator'; | ||
import { allModes } from '../../../.storybook/modes'; | ||
import { AudioPlayer as Player } from './AudioPlayer'; | ||
// import audioFile from './stories/default_audio_test.mp3'; | ||
|
||
const meta = { | ||
title: 'Components/Audio Player', | ||
component: Player, | ||
} satisfies Meta<typeof Player>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const AudioPlayer = { | ||
args: { | ||
// src: audioFile, | ||
src: 'https://audio.guim.co.uk/2024/10/18-57753-USEE_181024.mp3', | ||
mediaId: 'mediaId', | ||
showVolumeControls: true, | ||
}, | ||
parameters: { | ||
// We only want to snapshot the `multipleFormats` version below. | ||
chromatic: { disable: true }, | ||
}, | ||
} satisfies Story; | ||
|
||
export const MultipleFormats = { | ||
args: AudioPlayer.args, | ||
parameters: { | ||
formats: defaultFormats, | ||
chromatic: { | ||
modes: { | ||
horizontal: allModes.splitHorizontal, | ||
}, | ||
}, | ||
}, | ||
} satisfies Story; |
Oops, something went wrong.