1.0.7 • Published 2 years ago

react-native-country-info v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-native-country-info

Installation

# Using npm

npm install react-native-country-info

# Using yarn

yarn add react-native-country-info

Demo

Code provided in Examples folder.

Usage

import CountryInfo from 'react-native-country-info'
...

<CountryInfo 
    code="+91" 
    showFlag={true} 
    onPressItem={(itemInfo) => {
        console.log("Country Name ", itemInfo.name);
        console.log("Country Code ", itemInfo.code);
        console.log("Country ISD code ", itemInfo.isd_code);
    }}
/>

Props

Methods


code

code is present default value

TypeRequired
stringYes

showFlag

showFlag defalt value is true

TypeRequired
booleanNo

onPressItem

function that should return country info like name, ISD code, code, flag

TypeRequired
functionYes

rowStyle

style object for row

TypeRequired
objectNo

rowTextStyle

style object for row text

TypeRequired
objectNo

License

MIT