Skip to content

Commit

Permalink
Merge pull request GeekyAnts#2133 from GeekyAnts/fix/header/topPadder
Browse files Browse the repository at this point in the history
Fix for issue GeekyAnts#2128 (Vertical alignment of Items in Header on iPhone X)
  • Loading branch information
SupriyaKalghatgi authored Jul 16, 2018
2 parents f93b115 + ad49245 commit 0f58c14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/basic/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class Header extends Component {
let oldHeight = null;
if (this.props.style.height != undefined) {
oldHeight = this.props.style.height;
}else if(this.props.style[1]){
oldHeight= this.props.style[1].height ? this.props.style[1].height : this.props.style[0].height;
} else if (this.props.style[1]) {
oldHeight = this.props.style[1].height ? this.props.style[1].height : this.props.style[0].height;
} else {
oldHeight = this.props.style[0].height;
}
Expand All @@ -51,7 +51,7 @@ class Header extends Component {
const InsetValues = mode === "portrait" ? inset.portrait : inset.landscape;
let topPadder = null;
let style = StyleSheet.flatten(this.props.style);
if (style.padding !== undefined && style.paddingTop !== undefined) {
if (style.padding !== undefined || style.paddingTop !== undefined) {
topPadder = (style.paddingTop ? style.paddingTop : style.padding) + InsetValues.topInset;
} else {
topPadder = InsetValues.topInset;
Expand Down

0 comments on commit 0f58c14

Please sign in to comment.