A number input component for react project
npm install numberinput
A mobile number input component for react project
npm install --save inputnumber
`
secondly import in your page
`javascript
import NumberInput from 'numberinput'
`
and then use in your page
`HTML
value={value}
onChange={this.handleChange}
className={yourClassName}
prefixCls={yourPrefixCls}
defaultStyle={true}
isCycle={false}
type="number"
min={0}
max={100}
step={1} />
`
> Parameters
>+ className: default value is '_${prefixCls}\_numberInput_'
>+ prefixCls: default value is '_fy_'
>+ defaultStyle: use the default style file given by author, default value is '_true_'
>+ isCycle: when touch the top or the bottom, it will start from the opposite, default value is '_false_'
>+ type: values in {_"number", "time"_}, default value is '_number_'`javascript
handleChange(evt) {
/ Your change event here /
const value = evt.target.value;
}
``