Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions react-navigation-addon-search-layout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ declare module 'react-navigation-addon-search-layout' {
/** Color of text that the user enters into the search box **/
textColor?: string;

/** FontFamily of text that the user enters into the search box and for the text shown as cancel button **/
textFontFamily?: string;

/** Underline color of the text input on Android **/
searchInputUnderlineColorAndroid?: string;

Expand Down
4 changes: 4 additions & 0 deletions src/SearchBar.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ export default class SearchBar extends React.PureComponent {
if (this.props.textColor) {
searchInputStyle.color = this.props.textColor;
}
if (this.props.textFontFamily) {
searchInputStyle.fontFamily = this.props.textFontFamily;
}

return (
<View style={styles.container}>
Expand Down Expand Up @@ -154,6 +157,7 @@ export default class SearchBar extends React.PureComponent {
style={{
fontSize: 17,
color: this.props.tintColor || '#007AFF',
...(this.props.textFontFamily && { fontFamily: this.props.textFontFamily }),
}}>
{this.props.cancelButtonText || 'Cancel'}
</Text>
Expand Down
3 changes: 3 additions & 0 deletions src/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export default class SearchBar extends React.PureComponent {
if (this.props.textColor) {
searchInputStyle.color = this.props.textColor;
}
if (this.props.textFontFamily) {
searchInputStyle.fontFamily = this.props.textFontFamily;
}

return (
<View style={styles.container}>
Expand Down
1 change: 1 addition & 0 deletions src/SearchLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default class SearchLayout extends React.Component {
onSubmit={this._handleSubmit}
placeholderTextColor={this.props.searchInputPlaceholderTextColor}
textColor={this.props.searchInputTextColor}
textFontFamily={this.props.searchInputTextFontFamily}
Comment thread
summerkiflain marked this conversation as resolved.
selectionColor={this.props.searchInputSelectionColor}
underlineColorAndroid={
this.props.searchInputUnderlineColorAndroid ||
Expand Down