1.3.5 • Published 6 years ago

react-native-country-code-picker v1.3.5

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

react-native-country-code-picker

A react native country-code-picker plugin without any ios&android configuration

Installation

npm install react-native-country-code-picker --save or yarn add react-native-country-code-picker --save

Example

image

import React, { Component } from 'react';
import CountryCodePicker from 'react-native-country-code-picker';

export default class Example extends Component {
  render() {
    return (
      <CountryCodePicker isShow={true} onPick={(res) => { setTimeout(() => { alert(res.phoneCode) }, 1000) }} />
    );
  }
}

API

PropertyTypeDefaultDescription
isShowBooleanfalseWhether show or not
onPick  Functioncallback function after picked
animationTypeStringslideanimation('slide', 'fade', 'none') when show and hide

onPick response Object

PropertyTypeDescription
countryNameStringcountry name
countryPinyin  Stringcountry name spell in Chinese PinYin
phoneCodeStringarea code
countryCodeStringcountry code

License

MIT