0.3.3 • Published 5 years ago

runtime-picker v0.3.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Codeship Status for cloverinteractive/runtime-picker Coverage Status

Runtime-Picker

A react-bootstrap Popover that let's you set a runtime like i fyou were entering time in a microwave.


Dependencies

These are the things your project needs for runtime-picker to work.

  • react
  • react-dom
  • react-bootstrap

Installation

yarn add runtime-picker

You can then import it into your webpack components as follows:

import RuntimePicker from 'runtime-picker';

Usage

Runtime-Picker generates a hidden text field containing the runtime picked calculated in seconds, so you can submit this as part as our form, however you can send your custom onChange handler and receive the number of seconds when the component updates.

Runtime-Picker Props

PropertyTypeDefaultDescription
disabledbooleanfalseWhether the runtime picker should be disabled, this renders a hidden input as well and visible text field with the parsed runtime
maxHoursnumber9999This is the max number of hours you can enter in your runtime
namestring'runtime'The name of the hidden text field containing the runtime in seconds
onChangeFunctionundefinedEvent handler to be called after the component updates
placeholderstring'HHHH:MMM:SS'Visible text field placeholder text
placementstring'bottom' \| 'left' \| 'right' \| 'top'This is the Popover position relative to the visible text field
skipSecondsbooleanfalseWhether we wish to start from minutes instead of seconds and lose some granularity
titlestring'Pick your Runtime'This is the Popover's title
valuenumber0This is the startoff value in seconds

Caveats

If you're rendering inside a <Modal /> make sure to set your modal's enforceFocus prop to false.

0.3.3

5 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago