Fixed padding issues in header

This commit is contained in:
keplyx 2019-11-16 12:35:33 +01:00
parent 4e2045925a
commit 52729bee53

View file

@ -51,7 +51,6 @@ export default class CustomHeader extends React.Component<Props> {
getSearchBar() { getSearchBar() {
return ( return (
<Form>
<Item <Item
style={{ style={{
width: '100%', width: '100%',
@ -66,7 +65,6 @@ export default class CustomHeader extends React.Component<Props> {
placeholderTextColor={ThemeManager.getCurrentThemeVariables().toolbarPlaceholderColor} placeholderTextColor={ThemeManager.getCurrentThemeVariables().toolbarPlaceholderColor}
onChangeText={(text) => this.props.searchCallback(text)}/> onChangeText={(text) => this.props.searchCallback(text)}/>
</Item> </Item>
</Form>
); );
} }
@ -94,7 +92,9 @@ export default class CustomHeader extends React.Component<Props> {
<Body> <Body>
{this.props.hasSearchField ? {this.props.hasSearchField ?
this.getSearchBar() : this.getSearchBar() :
<Title>{this.props.title}</Title>} <Title style={{
paddingLeft: 10
}}>{this.props.title}</Title>}
</Body> </Body>
<Right style={{flex: this.props.hasSearchField ? 0 : 1}}> <Right style={{flex: this.props.hasSearchField ? 0 : 1}}>
{this.props.rightButton} {this.props.rightButton}