Giter Site home page Giter Site logo

weblineindia / react-native-country-code Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 67 KB

A JavaScript ReactNative component for listing Country codes in your app.

Home Page: https://www.weblineindia.com/software-development-resources.html

License: MIT License

Java 12.94% JavaScript 75.68% Objective-C 4.03% Ruby 7.34%
reactnative react-native react-native-component react-native-components react-components react-native-library react-native-plugin react-native-module react-native-country-code country-codes

react-native-country-code's Introduction

React Native Country Code Component

A pure JavaScript ReactNative component for listing Country codes in your app.

Getting started

Installation

$ npm install rn-weblineindia-country-code --save

Supported versions

We have tested this component in ReactNative 0.60 - 0.67. You can still use it in other versions.

Usage

First of all, Register CountryCode Component to the navigation stack

import CountryCode from 'rn-weblineindia-country-code';

<Stack.Screen 
    name="CountryCode" 
    component={CountryCode}
/>

Here is your screen in which you want to implement the Country List Component

openCountryCode() {
    this.props.navigation.navigate('CountryCode', {
    // Pass all props here... 
      isFrom: "HomeScreen",     // Your routeName
      onChangeValue: (data) => {
        console.log('data ->', data)
      }
    });
  }

<TouchableOpacity onPress={()=> this.openCountryCode()}>
    // Your code here
</TouchableOpacity>

Props

Props Type Required Description
navigation object yes Pass the navigation
isFrom string yes Pass the routeName (Your current screen)
navigationTheme string no Navigation theme for the component. There are two options 'light' and 'dark'
placeholderTitle string no Placeholder title
placeholderTextColor string no Placeholder title color
backArrowTintColor string no Color to be displayed to the header back arrow
searchViewStyle object no Styles is passed to the search view
searchFieldStyle object no Styles is passed to the search field text
defaultValueStyle object no Styles is passed to the default value (Not Selected)

Methods

Method Description
onChangeValue Callback method that is called when the selected value changes

Want to Contribute?

  • Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
  • Fork it.
  • Create new branch to contribute your changes.
  • Commit all your changes to your branch.
  • Submit a pull request.

Need Help?

We also provide a free, basic support for all users who want to use this ReactNative Country Code Component in their software project. In case you want to customize this Country Code Component to suit your development needs, then feel free to contact our ReactNative developers.


Collection of Components

We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development.


Changelog

Detailed changes for each release are documented in CHANGELOG.md.


License

MIT


Keywords

rn-weblineindia-country-code, react-native-country-code, country-code, react-native

react-native-country-code's People

Contributors

harshaldk-rn avatar partners-wli avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.