This repository was archived by the owner on Dec 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ export default class SearchBar extends React.PureComponent {
112
112
if ( this . props . textColor ) {
113
113
searchInputStyle . color = this . props . textColor ;
114
114
}
115
+ if ( this . props . textFont ) {
116
+ searchInputStyle . fontFamily = this . props . textFont ;
117
+ }
115
118
116
119
return (
117
120
< View style = { styles . container } >
@@ -151,10 +154,10 @@ export default class SearchBar extends React.PureComponent {
151
154
onLayout = { this . _handleLayoutCancelButton }
152
155
onPress = { this . _handlePressCancelButton } >
153
156
< Text
154
- style = { {
157
+ style = { [ {
155
158
fontSize : 17 ,
156
159
color : this . props . tintColor || '#007AFF' ,
157
- } } >
160
+ } , this . props . textFont ? { fontFamily : this . props . textFont } : null ] } >
158
161
{ this . props . cancelButtonText || 'Cancel' }
159
162
</ Text >
160
163
</ TouchableOpacity >
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ export default class SearchBar extends React.PureComponent {
21
21
if ( this . props . textColor ) {
22
22
searchInputStyle . color = this . props . textColor ;
23
23
}
24
+ if ( this . props . textFont ) {
25
+ searchInputStyle . fontFamily = this . props . textFont ;
26
+ }
24
27
25
28
return (
26
29
< View style = { styles . container } >
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export default class SearchLayout extends React.Component {
43
43
onSubmit = { this . _handleSubmit }
44
44
placeholderTextColor = { this . props . searchInputPlaceholderTextColor }
45
45
textColor = { this . props . searchInputTextColor }
46
+ textFont = { this . props . searchInputTextFont }
46
47
selectionColor = { this . props . searchInputSelectionColor }
47
48
underlineColorAndroid = {
48
49
this . props . searchInputUnderlineColorAndroid ||
You can’t perform that action at this time.
0 commit comments