Sha256: 617c107fe7dcc9573e584d85369c6a492c765dfdfb0d72bab30929bffbc03f59

Contents?: true

Size: 963 Bytes

Versions: 5

Compression:

Stored size: 963 Bytes

Contents

import React from "react"
import DateTimePicker from "./DateTimePicker"

import { select, boolean, number } from "@storybook/addon-knobs"

import styles from './story-styles.scss'

export default function DateTimePickerStory(stories) {
  stories.add("DateTimePicker",
    () => {
      const props = {
        datePickerProps: {
          labelText: "Date",
          disabled: boolean("datePickerProps.disabled", false),
          timeFormat: ""
        },
        timePickerProps: {
          clock: select("timePickerProps.clock", [12, 24], 12),
          disabled: boolean("timePickerProps.disabled", false),
          minHour: number('timePickerProps.minHour', 0, { range: true, min: 0, max: 24, step: 1}),
          maxHour: number('timePickerProps.maxHour', 24, { range: true, min: 0, max: 24, step: 1}),
        },
        onChange: () => {},
        className: styles.root,
      }
      return (
        <DateTimePicker {...props}/>
      )
    }
  )
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
playbook_ui-2.7.2 components/DateTimePicker/DateTimePickerStory.jsx
playbook_ui-2.7.1 components/DateTimePicker/DateTimePickerStory.jsx
playbook_ui-2.7.0 components/DateTimePicker/DateTimePickerStory.jsx
playbook_ui-2.6.0 components/DateTimePicker/DateTimePickerStory.jsx
playbook_ui-2.5.0 components/DateTimePicker/DateTimePickerStory.jsx