import React from 'react' import { ComponentStory, ComponentMeta } from '@storybook/react' import Slider from './Slider' import { useArgs } from '@storybook/client-api' import { cx } from '@emotion/css' export default { title: 'Basic/Slider', component: Slider, args: { value: 50, min: 0, max: 100, onlyCallOnChangeAfterDragEnded: false, orientation: 'horizontal', alwaysShowTrack: false, alwaysShowThumb: false, }, } as ComponentMeta const Template: ComponentStory = args => { const [, updateArgs] = useArgs() return (
updateArgs({ value })} />
) } export const Default = Template.bind({}) export const Vertical = Template.bind({}) Vertical.args = { orientation: 'vertical', alwaysShowTrack: true, alwaysShowThumb: true, }