Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions packages/bezier-react/src/components/Slider/Slider.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { type Meta } from '@storybook/react'
import { type Meta, type StoryObj } from '@storybook/react'

import { Slider } from './Slider'

const meta: Meta<typeof Slider> = {
component: Slider,
argTypes: {
value: {
control: {
type: 'object',
},
},
minStepsBetweenThumbs: {
control: {
type: 'number',
Expand All @@ -21,15 +16,21 @@ const meta: Meta<typeof Slider> = {
onValueCommit: {
action: 'onValueCommit',
},
value: {
if: {
exists: true,
arg: 'value',
},
},
defaultValue: {
if: {
exists: true,
arg: 'defaultValue',
},
},
},
Comment on lines +19 to +30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
export default meta

export const Primary = {
args: {
width: 285,
defaultValue: [5],
value: undefined,
disabled: false,
guide: [5],
min: 0,
Expand All @@ -38,3 +39,16 @@ export const Primary = {
disableTooltip: false,
},
}
export default meta

export const Primary = {
args: {
value: [5],
},
} satisfies StoryObj<typeof meta>

export const Uncontrolled = {
args: {
defaultValue: [5],
},
} satisfies StoryObj<typeof meta>
Loading