Skip to content

Commit 5f81502

Browse files
committed
Patch Work and new prop added to style search text field
1 parent d0c6c6d commit 5f81502

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-drop
9090
| phoneStyles | style object | style object to style the text input of phone field (Optional) | N/A
9191
| searchIcon | string | URL of the icon if you want to replace the search icon (Optional) | N/A
9292
| closeIcon | string | URL of the icon if you want to replace the close icon (Optional) | N/A
93-
| searchStyles | style object | style object to style the search input field (Optional) | N/A
93+
| searchStyles | style object | style object to style the search field (Optional) | N/A
94+
| searchTextStyles | style object | style object to style the search text input field (Optional) | N/A
9495
| dropdownStyles | style object | style object to style the dropdown container (Optional) | N/A
9596
| dropdownTextStyles | style object | style object to style the text inside dropdown container (Optional) | N/A
9697

index.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ export interface CountryCodeProps {
4343
*/
4444
closeIcon?: string,
4545
/**
46-
* Search Input Text Styles
46+
* Search Input Container Styles
4747
*/
4848
searchStyles?: ViewStyle,
49+
/**
50+
* Search Input Text Styles
51+
*/
52+
searchTextStyles?: ViewStyle,
4953
/**
5054
* Search Dropdown Container Styles
5155
*/

index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const CountryCodeDropdownPicker: React.FC<CountryCodeProps> = ({
7272
searchIcon,
7373
closeIcon,
7474
searchStyles={},
75+
searchTextStyles={},
7576
dropdownStyles={},
7677
dropdownTextStyles={},
7778
}) => {
@@ -146,11 +147,11 @@ const CountryCodeDropdownPicker: React.FC<CountryCodeProps> = ({
146147
)
147148
}else{
148149
return(
149-
<View style={styles.inputBoxContainer}>
150+
<View style={[styles.inputBoxContainer, searchStyles]}>
150151
<View style={[styles.row, {width: '90%'}]}>
151152
<Image source={_static.search} resizeMode={'contain'} style={[styles.icon, {width: 15, height: 15, marginLeft: 10}]} />
152153
<TextInput
153-
style={[{ marginLeft: 5, paddingVertical: 3, flex: 1 }, searchStyles]}
154+
style={[{ marginLeft: 5, paddingVertical: 3, flex: 1 }, searchTextStyles]}
154155
onChangeText={ _searchCountry }
155156
value={ _search }
156157
/>

0 commit comments

Comments
 (0)