forked from vergnet/application-amicale
Improved headers search bar design
This commit is contained in:
parent
dd11fcc2c7
commit
edfb32667c
3 changed files with 11 additions and 4 deletions
|
@ -47,8 +47,13 @@ export default class CustomHeader extends React.Component<Props> {
|
|||
width: '100%',
|
||||
marginBottom: 7
|
||||
}}>
|
||||
<Input placeholder={i18n.t('proximoScreen.search')}
|
||||
onChangeText={(text) => this.props.searchCallback(text)}/>
|
||||
<CustomMaterialIcon
|
||||
icon={'magnify'}
|
||||
color={ThemeManager.getCurrentThemeVariables().toolbarBtnColor}/>
|
||||
<Input
|
||||
placeholder={i18n.t('proximoScreen.search')}
|
||||
placeholderTextColor={ThemeManager.getCurrentThemeVariables().toolbarPlaceholderColor}
|
||||
onChangeText={(text) => this.props.searchCallback(text)}/>
|
||||
</Item>
|
||||
);
|
||||
}
|
||||
|
@ -71,7 +76,7 @@ export default class CustomHeader extends React.Component<Props> {
|
|||
return (
|
||||
<Header style={styles.header}
|
||||
hasTabs={this.props.hasTabs}>
|
||||
<Left>
|
||||
<Left style={{flex: 0}}>
|
||||
{button}
|
||||
</Left>
|
||||
<Body>
|
||||
|
@ -79,7 +84,7 @@ export default class CustomHeader extends React.Component<Props> {
|
|||
this.getSearchBar() :
|
||||
<Title>{this.props.title}</Title>}
|
||||
</Body>
|
||||
<Right>
|
||||
<Right style={{flex: this.props.hasSearchField ? 0 : 1}}>
|
||||
{this.props.rightButton}
|
||||
{this.props.hasBackButton ? <View/> :
|
||||
<Touchable
|
||||
|
|
|
@ -154,6 +154,7 @@ export default {
|
|||
toolbarHeight: platform === "ios" ? 64 : 56,
|
||||
toolbarSearchIconSize: platform === "ios" ? 20 : 23,
|
||||
toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff",
|
||||
toolbarPlaceholderColor: platform === "ios" ? "#CECDD2" : "#CECDD2",
|
||||
searchBarHeight: platform === "ios" ? 30 : 40,
|
||||
searchBarInputHeight: platform === "ios" ? 30 : 50,
|
||||
toolbarBtnTextColor: platform === "ios" ? "#be1522" : "#fff",
|
||||
|
|
|
@ -155,6 +155,7 @@ export default {
|
|||
toolbarHeight: platform === "ios" ? 64 : 56,
|
||||
toolbarSearchIconSize: platform === "ios" ? 20 : 23,
|
||||
toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff",
|
||||
toolbarPlaceholderColor: platform === "ios" ? "#CECDD2" : "#CECDD2",
|
||||
searchBarHeight: platform === "ios" ? 30 : 40,
|
||||
searchBarInputHeight: platform === "ios" ? 30 : 50,
|
||||
toolbarBtnTextColor: platform === "ios" ? "#be1522" : "#fff",
|
||||
|
|
Loading…
Reference in a new issue