react-native-bpk-component-nudger
v5.0.1
Published
Backpack React Native budger component.
Downloads
29
Maintainers
Keywords
Readme
react-native-bpk-component-nudger
Backpack React Native nudger component.
Installation
npm install react-native-bpk-component-nudger --save-dev
Usage
import React, { Component } from 'react';
import BpkNudger from 'react-native-bpk-component-nudger';
export default class App extends Component {
constructor() {
super();
this.state = { value: 1 };
}
handleChange = (value) => {
this.setState({ value });
}
render() {
return (
<BpkNudger
min={1}
max={10}
value={this.state.value}
onChange={this.handleChange}
decreaseButtonLabel="Decrease"
increaseButtonLabel="Increase"
/>
);
}
}
Props
| Property | PropType | Required | Default Value | | --------------------- | ------------------------------------- | -------- | ------------- | | decreaseButtonLabel | string | true | - | | increaseButtonLabel | string | true | - | | max | number | true | - | | min | number | true | - | | onChange | func | true | - | | value | number | true | - | | theme | See Theme Props below | false | null |
Theme Props
Same as secondary button.