1.0.0 • Published 8 years ago
@5rabbits/time-input v1.0.0
@5rabbits/time-input

A time input in 00h 00m format.
Usage
- Install with
yarn add @5rabbits/time-input. - Install peer dependencies (if you haven't already)
yarn add react@^16.0.0 react-dom@^16.0.0. React 15 is also supported. - Use the component:
import TimeInput from '@5rabbits/time-input'
<TimeInput />Props
| prop | type | default | required | description |
|---|---|---|---|---|
| clearable | bool | true | If true the input can be emptied (notifying value null). If false when the user tries to clear the text it will be set to 0. | |
| defaultValue | number | The initial value in minutes to use as an uncontrolled input. | ||
| onChange | func | Callback that will be invoked when the value changes. The first argument will be the new value in minutes. | ||
| value | number | The value in minutes to use as a controlled input. |
Development
- Run
yarn startto start building the library in watch mode. - Write stories in the
stories/index.jsfile. - Run
yarn publishto release a new version.
This project lints and prettifies source files automatically before commiting.