Skip to content

react-native-nigeria-community/react-native-number-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

React Native Number View

All Contributors

image1

image1

image1

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
 */

import React, {Component} from 'react';
import {View} from 'react-native';
import {NumberView} from 'react-native-number-view'
 
type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
          <NumberView
            enableDefaultStyles={true}
            themeColor="#3F6D2A"
            leftContent={<Text>๐Ÿ˜”</Text>}
            rightContent={<Text>๐Ÿ˜ƒ</Text>}
            onValueChange={(newVal)=>{alert(newVal)}}
            onDecrement={()=>{alert('decremented')}}
            onIncrement={()=>{alert('Incremented')}}
          />
      </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.

Don't forget to star, like and share :)

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Oluwatobi Shokunbi

๐Ÿ’ป ๐Ÿ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

About

๐Ÿ”ข๐Ÿ“ฑA simple React Native number counter component.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published