React Native Number View
This is a simple React Native number counter component.
Installation
Add react-native-number-view to your project by executing
$ npm install react-native-number-view
or
$ yarn add react-native-number-view
and that's it, you're all good to go!
Usage
/** * Sample React Native App * https://github.com/facebook/react-native * * @format * @flow */ ;; type Props = {};<Props> { return <View style=stylescontainer> <NumberView enableDefaultStyles=true themeColor="#3F6D2A" leftContent=<Text>😔</Text> rightContent=<Text>😃</Text> onValueChange={} onDecrement={} onIncrement={} /> </View> ; }
API's
Name | Use | Default Values |
---|---|---|
leftContent | Content to be displayed on the left | None |
rightContent | Content to be displayed on the Right | None |
onValueChange | Callback which return new value | None |
onDecrement | callback each time value is decremented | None |
onIncrement | callback each time value is incremented | None |
themeColor | Use to set a theme color(only accepts HEX) | none |
enableDefaultStyles (boolean) | enable or disable preset styles | True |
initialValue | counters initial value | 0 |
Contributions
What to help make this package even more awesome? Read how to contribute
Licensing
This project is licensed under MIT license.