React component that helps user select item quantity easily. Designed to work together with Bootstrap Button component. Supports Bootstrap's Buttons component classes.
npm install --save react-quantity-picker
- Import component:
var QtyPicker = require('react-quantity-picker')
var QtyPicker = require('react-quantity-picker')
var value = 1
<QtyPicker
value = { value }
onChange = { function (newValue) { value = newValue } } />
See src/example/example.js
for more
Required. Define the value of the component.
Required. This function is triggered when picker value changes.
Example:
function handleChange(newValue) {
console.log(newValue)
}
Optional. Define how many buttons are shown.