This repository was archived by the owner on Dec 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ declare module 'react-navigation-addon-search-layout' {
2020 /** Color of text that the user enters into the search box **/
2121 textColor ?: string ;
2222
23+ /** FontFamily of text that the user enters into the search box and for the text shown as cancel button **/
24+ textFontFamily ?: string ;
25+
2326 /** Underline color of the text input on Android **/
2427 searchInputUnderlineColorAndroid ?: string ;
2528
Original file line number Diff line number Diff line change @@ -154,14 +154,11 @@ export default class SearchBar extends React.PureComponent {
154154 onLayout = { this . _handleLayoutCancelButton }
155155 onPress = { this . _handlePressCancelButton } >
156156 < Text
157- style = { [
158- {
159- fontSize : 17 ,
160- color : this . props . tintColor || '#007AFF' ,
161- } ,
162- this . props . textFontFamily ? { fontFamily : this . props . textFontFamily } : null
163- ] }
164- >
157+ style = { {
158+ fontSize : 17 ,
159+ color : this . props . tintColor || '#007AFF' ,
160+ ...( this . props . textFontFamily && { fontFamily : this . props . textFontFamily } ) ,
161+ } } >
165162 { this . props . cancelButtonText || 'Cancel' }
166163 </ Text >
167164 </ TouchableOpacity >
You can’t perform that action at this time.
0 commit comments