-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
e746348
commit 8a76f76
Showing
1 changed file
with
56 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import AutoPlay from '../components/Playback/Autoplay'; | ||
|
||
export default { | ||
title: 'Components/AutoPlay', | ||
component: AutoPlay, | ||
argTypes: { | ||
instruction: { control: 'text' }, | ||
showAnimation: { control: 'boolean' }, | ||
playSection: { action: 'playSection' }, | ||
startedPlaying: { action: 'startedPlaying' }, | ||
finishedPlaying: { action: 'finishedPlaying' }, | ||
responseTime: { control: 'number' }, | ||
className: { control: 'text' }, | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<div className='aha__trial' style={{ padding: '3rem', background: '#333' }}> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
} as Meta; | ||
|
||
const Template: Story = (args) => <AutoPlay {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
instruction: 'Listen to the audio', | ||
showAnimation: true, | ||
responseTime: 5000, | ||
className: '', | ||
}; | ||
|
||
export const WithoutAnimation = Template.bind({}); | ||
WithoutAnimation.args = { | ||
...Default.args, | ||
showAnimation: false, | ||
}; | ||
|
||
export const LongResponseTime = Template.bind({}); | ||
LongResponseTime.args = { | ||
...Default.args, | ||
responseTime: 10000, | ||
}; | ||
|
||
export const CustomInstruction = Template.bind({}); | ||
CustomInstruction.args = { | ||
...Default.args, | ||
instruction: 'This is a custom instruction for the AutoPlay component', | ||
}; | ||
|
||
export const WithCustomClassName = Template.bind({}); | ||
WithCustomClassName.args = { | ||
...Default.args, | ||
className: 'custom-class', | ||
}; |