Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions src/pages/iou/ModalHeader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {View, TouchableOpacity} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../../styles/styles';
import Icon from '../../components/Icon';
Expand All @@ -8,6 +8,7 @@ import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize
import * as Expensicons from '../../components/Icon/Expensicons';
import Tooltip from '../../components/Tooltip';
import Navigation from '../../libs/Navigation/Navigation';
import PressableWithFeedback from '../../components/Pressable/PressableWithFeedback';

const propTypes = {
/** Title of the header */
Expand All @@ -32,25 +33,33 @@ const ModalHeader = (props) => (
<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.flexGrow1, styles.justifyContentBetween, styles.overflowHidden]}>
{props.shouldShowBackButton && (
<Tooltip text={props.translate('common.back')}>
<TouchableOpacity
<PressableWithFeedback
onPress={props.onBackButtonPress}
style={[styles.touchableButtonImage]}
accessibilityRole="button"
accessibilityLabel={props.translate('common.back')}
// disable hover dimming
hoverDimmingValue={1}
pressDimmingValue={0.2}
>
<Icon src={Expensicons.BackArrow} />
</TouchableOpacity>
</PressableWithFeedback>
</Tooltip>
)}
<Header title={props.title} />
<View style={[styles.reportOptions, styles.flexRow, styles.pr5]}>
<Tooltip text={props.translate('common.close')}>
<TouchableOpacity
<PressableWithFeedback
onPress={() => Navigation.dismissModal()}
style={[styles.touchableButtonImage]}
accessibilityRole="button"
accessibilityLabel={props.translate('common.close')}
// disable hover dimming
hoverDimmingValue={1}
pressDimmingValue={0.2}
>
<Icon src={Expensicons.Close} />
</TouchableOpacity>
</PressableWithFeedback>
</Tooltip>
</View>
</View>
Expand Down