react-native-country-codes-picker
Advanced tools
Comparing version 1.2.1 to 1.2.2
import React from 'react'; | ||
import {Text, TouchableOpacity} from "react-native"; | ||
export const CountryButton = ({item, name, countryButtonStyles, ...rest}) => ( | ||
export const CountryButton = ({item, name, style, ...rest}) => ( | ||
<TouchableOpacity | ||
style={[styles.countryButton, countryButtonStyles]} | ||
style={[styles.countryButton, style?.countryButtonStyles]} | ||
{...rest} | ||
> | ||
<Text style={{ | ||
flex: 0.2 | ||
}}> | ||
<Text style={[ | ||
{ | ||
flex: 0.2 | ||
}, | ||
style?.flag | ||
]}> | ||
{item?.flag} | ||
</Text> | ||
<Text style={{ | ||
<Text style={[{ | ||
flex: 0.3, | ||
}}> | ||
}, style?.dialCode]}> | ||
{item?.dial_code} | ||
</Text> | ||
<Text style={{ | ||
<Text style={[{ | ||
flex: 1 | ||
}}> | ||
}, style?.countryName]}> | ||
{name} | ||
@@ -23,0 +26,0 @@ </Text> |
@@ -85,6 +85,6 @@ import React from 'react'; | ||
<Text | ||
style={{ | ||
style={[{ | ||
color: '#8c8c8c', | ||
fontSize: 16, | ||
}} | ||
}, style?.searchMessageText]} | ||
> | ||
@@ -109,3 +109,3 @@ {searchMessage || 'Sorry we cant find your country :('} | ||
item={item} | ||
countryButtonStyles={style?.countryButtonStyles} | ||
style={style} | ||
name={checkName} | ||
@@ -112,0 +112,0 @@ onPress={() => { |
{ | ||
"name": "react-native-country-codes-picker", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "This lib. provide country iso picker with search functionality", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
90499
3340