Skip to content

Commit

Permalink
Merge pull request #19854 from robertKozik/17010-migrate-IOUPreview
Browse files Browse the repository at this point in the history
migrate IOUPreview to PressableWithFeedback
  • Loading branch information
mountiny committed Jun 7, 2023
2 parents ff31072 + d2a7f8b commit 7d33fb5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/ReportActionItem/IOUPreview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {View, Pressable} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import lodashGet from 'lodash/get';
Expand Down Expand Up @@ -27,6 +27,7 @@ import * as CurrencyUtils from '../../libs/CurrencyUtils';
import * as IOUUtils from '../../libs/IOUUtils';
import * as ReportUtils from '../../libs/ReportUtils';
import refPropTypes from '../refPropTypes';
import PressableWithFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** The active IOUReport, used for Onyx subscription */
Expand Down Expand Up @@ -245,14 +246,16 @@ const IOUPreview = (props) => {
}

return (
<Pressable
<PressableWithFeedback
onPress={props.onPreviewPressed}
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
onLongPress={showContextMenu}
accessibilityLabel={props.isBillSplit ? props.translate('iou.split') : props.translate('iou.cash')}
accessibilityHint={CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency)}
>
{childContainer}
</Pressable>
</PressableWithFeedback>
);
};

Expand Down

0 comments on commit 7d33fb5

Please sign in to comment.