/
Progress.stories.tsx
73 lines (61 loc) 路 1.49 KB
/
Progress.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import React from 'react'
import { Story, Meta } from '@storybook/react'
import Progress, { ProgressProps } from '.'
export default {
title: 'Data Display/Progress',
component: Progress,
} as Meta
const Template: Story<ProgressProps> = (args) => {
return (
<div className='flex flex-col gap-y-2'>
<Progress {...args} className="w-56" value={0} />
<Progress {...args} className="w-56" value={10} />
<Progress {...args} className="w-56" value={40} />
<Progress {...args} className="w-56" value={70} />
<Progress {...args} className="w-56" value={100} />
</div>
)
}
export const Default = Template.bind({})
Default.args = {
max: 100,
}
export const PrimaryColor = Template.bind({})
PrimaryColor.args = {
max: 100,
color: 'primary'
}
export const SecondaryColor = Template.bind({})
SecondaryColor.args = {
max: 100,
color: 'secondary'
}
export const AccentColor = Template.bind({})
AccentColor.args = {
max: 100,
color: 'accent'
}
export const SuccessColor = Template.bind({})
SuccessColor.args = {
max: 100,
color: 'success'
}
export const InfoColor = Template.bind({})
InfoColor.args = {
max: 100,
color: 'info'
}
export const WarningColor = Template.bind({})
WarningColor.args = {
max: 100,
color: 'warning'
}
export const ErrorColor = Template.bind({})
ErrorColor.args = {
max: 100,
color: 'error'
}
export const Indeterminate: Story<ProgressProps> = (args) => {
return <Progress {...args} className="w-56" />
}
Indeterminate.args = {}