-
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.
Fixed: Fix Circle percentage overlap issue (attempt 3) (#1291)
* style: Move rotate transform and transform origin to the circle's svg level * story(AutoPlay): Add `AutoPlay` story
- Loading branch information
1 parent
59fbc14
commit c3c8a13
Showing
2 changed files
with
59 additions
and
4 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
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', | ||
}; |