import React from 'react'
import { Meta } from '@storybook/react/types-6-0'
import { Story } from '@storybook/react'
import { TimePicker,TimePickerProps } from './TimePicker'
import { useArgs } from '@storybook/client-api'

export default {
  title:'Components/TimePicker',
  component: TimePicker,
  argTypes: {}
} as Meta

const Template: Story<TimePickerProps> = (args) => {
  const today = new Date()
  const [{ value },updateArgs] = useArgs()

  const handleChange = (value: string ) => {
    updateArgs({ value })
  }
  return (
    <TimePicker 
      {...args}
      value={value} 
      onChange={handleChange} 
    />
  )
}

export const Basic = Template.bind({})
Basic.args = { label:'Clock-in' }


