Skip to content

Commit fa74019

Browse files
committed
GorgeousHeader: Added searchBarStyle prop to style search container
Added a search bar style prop that can be used to override the default styles associated with the search bar container. This is useful if you want to add shadow or decrease the margin between the text and search bar.
1 parent 6b3db41 commit fa74019

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ import { ClassicHeader } from "@freakycoder/react-native-header-view";
149149
| searchIcon | asset | default | set your own icon for the search one |
150150
| titleTextStyle | style | default | set your own style for title text |
151151
| subtitleTextStyle | style | default | set your own style for subtitle text |
152+
| searchBarStyle | style | default | set your own style for search text input container |
152153
| searchInputStyle | style | default | set your own style for search text input |
153154
| menuImageStyle | style | default | set your own style for hamburger menu image |
154155
| menuImageSource | asset | default | set your own image instead of default hamburger menu image |

lib/src/components/GorgeousHeader/GorgeousHeader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class GorgeousHeader extends Component {
4646
subtitle,
4747
searchIcon,
4848
titleTextStyle,
49+
searchBarStyle,
4950
searchInputStyle,
5051
subtitleTextStyle,
5152
} = this.props;
@@ -55,7 +56,7 @@ class GorgeousHeader extends Component {
5556
<Text style={subtitleTextStyle || styles.subtitleTextStyle}>
5657
{subtitle}
5758
</Text>
58-
<View style={styles.searchBarStyle}>
59+
<View style={[styles.searchBarStyle, searchBarStyle]}>
5960
<Image
6061
style={styles.searchImageStyle}
6162
source={searchIcon || searchImage}

0 commit comments

Comments
 (0)