This repository was archived by the owner on Dec 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ declare module 'react-navigation-addon-search-layout' {
20
20
/** Color of text that the user enters into the search box **/
21
21
textColor ?: string ;
22
22
23
+ /** FontFamily of text that the user enters into the search box and for the text shown as cancel button **/
24
+ textFontFamily ?: string ;
25
+
23
26
/** Underline color of the text input on Android **/
24
27
searchInputUnderlineColorAndroid ?: string ;
25
28
Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ class SearchBar extends React.PureComponent {
109
109
if ( this . props . textColor ) {
110
110
searchInputStyle . color = this . props . textColor ;
111
111
}
112
+ if ( this . props . textFontFamily ) {
113
+ searchInputStyle . fontFamily = this . props . textFontFamily ;
114
+ }
112
115
113
116
return (
114
117
< View style = { styles . container } >
@@ -151,6 +154,7 @@ class SearchBar extends React.PureComponent {
151
154
style = { {
152
155
fontSize : 17 ,
153
156
color : this . props . tintColor || '#007AFF' ,
157
+ ...( this . props . textFontFamily && { fontFamily : this . props . textFontFamily } ) ,
154
158
} } >
155
159
{ this . props . cancelButtonText || 'Cancel' }
156
160
</ Text >
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ class SearchBar extends React.PureComponent {
19
19
if ( this . props . textColor ) {
20
20
searchInputStyle . color = this . props . textColor ;
21
21
}
22
+ if ( this . props . textFontFamily ) {
23
+ searchInputStyle . fontFamily = this . props . textFontFamily ;
24
+ }
22
25
23
26
return (
24
27
< 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
+ textFontFamily = { this . props . searchInputTextFontFamily }
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