All files / app/src/shared/ui/range-datepicker range-datepicker.stories.tsx

100% Statements 22/22
100% Branches 2/2
100% Functions 2/2
100% Lines 22/22

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 291x     1x 1x 1x 1x 1x 1x 1x 1x 1x   1x   1x 1x   1x 1x 1x 1x   1x 1x 1x 1x 1x  
import { Story, Meta } from '@storybook/react'
import { RangeDatepicker, RangeDatepickerProps } from './range-datepicker'
 
export default {
  title: 'Shared/Range Datepicker',
  component: RangeDatepicker,
  args: {
    name: 'storybook-range-datepicker',
    label: 'START TIME',
    t: (str: string) => str,
  },
} as Meta
 
const Template: Story<RangeDatepickerProps> = args => <RangeDatepicker {...args} />
 
export const Default = Template.bind({})
Default.args = {}
 
export const Disabled = Template.bind({})
Disabled.args = {
  disabled: true,
}
 
export const WithError = Template.bind({})
WithError.args = {
  error: true,
  errorMessage: 'Invalid date',
}