Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 6d910c6

Browse files
committed
Incorporated PR feedback
1 parent bf7cb7a commit 6d910c6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

react-navigation-addon-search-layout.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/SearchBar.ios.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)