Skip to content

Commit

Permalink
Merge pull request #20260 from Skalakid/17058-migrate-AvatarCropModal
Browse files Browse the repository at this point in the history
17058 - migrate AvatarCropModal to PressableWithoutFeedback
  • Loading branch information
roryabraham authored Jun 21, 2023
2 parents cba7b46 + c1115b8 commit 62323c4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/AvatarCropModal/AvatarCropModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, {useCallback, useEffect, useState} from 'react';
import {ActivityIndicator, Image, View, Pressable} from 'react-native';
import {ActivityIndicator, Image, View} from 'react-native';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {runOnUI, interpolate, useAnimatedGestureHandler, useSharedValue, useWorkletCallback} from 'react-native-reanimated';
import CONST from '../../CONST';
Expand All @@ -21,6 +21,7 @@ import cropOrRotateImage from '../../libs/cropOrRotateImage';
import HeaderGap from '../HeaderGap';
import * as StyleUtils from '../../styles/StyleUtils';
import Tooltip from '../Tooltip';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** Link to image for cropping */
Expand Down Expand Up @@ -396,16 +397,18 @@ function AvatarCropModal(props) {
src={Expensicons.Zoom}
fill={themeColors.icons}
/>
<Pressable
<PressableWithoutFeedback
style={[styles.mh5, styles.flex1]}
onLayout={initializeSliderContainer}
onPressIn={(e) => runOnUI(sliderOnPress)(e.nativeEvent.locationX)}
accessibilityLabel="slider"
accessibilityRole="adjustable"
>
<Slider
sliderValue={translateSlider}
onGesture={panSliderGestureEventHandler}
/>
</Pressable>
</PressableWithoutFeedback>
<Tooltip
text={props.translate('common.rotate')}
shiftVertical={-2}
Expand Down

0 comments on commit 62323c4

Please sign in to comment.