react-native-country-info
Version:
116 lines (68 loc) • 1.64 kB
Markdown
```bash
npm install react-native-country-info
```
```bash
yarn add react-native-country-info
```
<!-- [](https://postimg.cc/sB4bkrQS)
[](https://postimg.cc/XBdfPVX6) -->
```
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);
}}
/>
```
- [`code`](
- [`showFlag`](
- [`rowStyle`](
- [`rowTextStyle`](
- [`onPressItem`](
---
code is present default value
| Type | Required |
| ----- | -------- |
| string | Yes |
---
showFlag defalt value is true
| Type | Required |
| -------- | -------- |
| boolean | No |
---
function that should return country info like name, ISD code, code, flag
| Type | Required |
| -------- | -------- |
| function | Yes |
---
style object for row
| Type | Required |
| ------ | -------- |
| object | No |
---
style object for row text
| Type | Required |
| ------ | -------- |
| object | No |
---
[](https://choosealicense.com/licenses/mit/)