-
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.
Merge pull request #80 from brainstormforce/SUR-293
SUR-293 - Added Progress Bar Story
- Loading branch information
Showing
1 changed file
with
78 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,78 @@ | ||
import ProgressBar from './progress-bar'; | ||
|
||
export default { | ||
title: 'Atoms/ProgressBar', | ||
component: ProgressBar, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: [ 'autodocs' ], | ||
argTypes: { | ||
progress: { | ||
name: 'Progress', | ||
description: 'Defines the progress percentage of the bar (0-100).', | ||
control: { type: 'range', min: 0, max: 100 }, | ||
table: { | ||
type: { summary: 'number' }, | ||
defaultValue: { summary: 0 }, | ||
}, | ||
}, | ||
speed: { | ||
name: 'Speed', | ||
description: 'Defines the animation speed in milliseconds.', | ||
control: { type: 'number' }, | ||
table: { | ||
type: { summary: 'number' }, | ||
defaultValue: { summary: 200 }, | ||
}, | ||
}, | ||
className: { | ||
name: 'Class Name', | ||
description: 'Additional custom classes for the progress bar.', | ||
control: 'text', | ||
table: { | ||
type: { summary: 'string' }, | ||
defaultValue: { summary: '' }, | ||
}, | ||
}, | ||
}, | ||
decorators: [ | ||
( Story ) => ( | ||
<div style={ { width: '400px' } }> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
}; | ||
|
||
// Basic ProgressBar | ||
export const Basic = { | ||
args: { | ||
progress: 50, | ||
speed: 200, | ||
}, | ||
}; | ||
|
||
// Full Progress | ||
export const FullProgress = { | ||
args: { | ||
progress: 100, | ||
speed: 200, | ||
}, | ||
}; | ||
|
||
// Slow ProgressBar | ||
export const SlowProgress = { | ||
args: { | ||
progress: 75, | ||
speed: 1000, | ||
}, | ||
}; | ||
|
||
// Zero Progress | ||
export const ZeroProgress = { | ||
args: { | ||
progress: 0, | ||
speed: 200, | ||
}, | ||
}; |