Skip to content

Commit

Permalink
Merge pull request #18465 from Expensify/yuwen-fixHeader
Browse files Browse the repository at this point in the history
Fix header with close button styles
  • Loading branch information
yuwenmemon authored May 5, 2023
2 parents 230b7f7 + 6fede6d commit a3aa887
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions src/components/HeaderWithCloseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,37 +165,35 @@ class HeaderWithCloseButton extends Component {
styles.overflowHidden,
]}
>
<View style={[styles.flexRow, styles.flex1]}>
{this.props.shouldShowBackButton && (
<Tooltip text={this.props.translate('common.back')}>
<Pressable
onPress={() => {
if (this.props.isKeyboardShown) {
Keyboard.dismiss();
}
this.props.onBackButtonPress();
}}
style={[styles.touchableButtonImage]}
>
<Icon src={Expensicons.BackArrow} />
</Pressable>
</Tooltip>
)}
{this.props.shouldShowAvatarWithDisplay && (
<AvatarWithDisplayName
report={this.props.report}
policies={this.props.policies}
personalDetails={this.props.personalDetails}
/>
)}
</View>
{this.props.shouldShowBackButton && (
<Tooltip text={this.props.translate('common.back')}>
<Pressable
onPress={() => {
if (this.props.isKeyboardShown) {
Keyboard.dismiss();
}
this.props.onBackButtonPress();
}}
style={[styles.touchableButtonImage]}
>
<Icon src={Expensicons.BackArrow} />
</Pressable>
</Tooltip>
)}
{this.props.shouldShowAvatarWithDisplay && (
<AvatarWithDisplayName
report={this.props.report}
policies={this.props.policies}
personalDetails={this.props.personalDetails}
/>
)}
{!this.props.shouldShowAvatarWithDisplay && (
<Header
title={this.props.title}
subtitle={this.props.stepCounter && this.props.shouldShowStepCounter ? this.props.translate('stepCounter', this.props.stepCounter) : this.props.subtitle}
/>
)}
<View style={[styles.reportOptions, styles.flexRow]}>
<View style={[styles.reportOptions, styles.flexRow, styles.pr5]}>
{
this.props.shouldShowDownloadButton && (
<Tooltip text={this.props.translate('common.download')}>
Expand Down

0 comments on commit a3aa887

Please sign in to comment.