react-quantity-textinput
v1.0.2
Published
A TextInput for quantity using up and down buttons.
Downloads
21
Maintainers
Readme
react-quantity-textinput
Install
npm i react-quantity-textinput
Usage
import React, { Component } from 'react';
var Quantity = require('react-quantity-textinput');
module.exports = React.createClass({
render: function () {
return <Quantity onChangeText={(text) => this.setState({ quantity: text })} />
}
});
Optional
import React, { Component } from 'react';
var Quantity = require('react-quantity-textinput');
module.exports = React.createClass({
render: function () {
return <Quantity
style={{flex:1}}
styleTextInput={{backgroundColor:'#ffffff'}}
styleButton={{backgroundColor:'#000000'}}
styleImage={{width:12, height:12}}
editable={false}
stepsize={5}
initialValue={5}
min={5}
max={100} />
}
});