Skip to content

Commit

Permalink
Merge pull request #20068 from Skalakid/20019-migrate-TaskHeader
Browse files Browse the repository at this point in the history
20019 - migrated TaskHeader to PressableWithFeedback
  • Loading branch information
Gonals authored Jun 5, 2023
2 parents 5c7b3c2 + 04a559b commit 96adb8e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/TaskHeader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect} from 'react';
import {View, TouchableOpacity} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import _ from 'underscore';
Expand All @@ -22,6 +22,7 @@ import MenuItemWithTopDescription from './MenuItemWithTopDescription';
import Button from './Button';
import * as TaskUtils from '../libs/actions/Task';
import * as UserUtils from '../libs/UserUtils';
import PressableWithFeedback from './Pressable/PressableWithFeedback';

const propTypes = {
/** The report currently being looked at */
Expand Down Expand Up @@ -50,9 +51,13 @@ function TaskHeader(props) {
<View style={[{backgroundColor: themeColors.highlightBG}, styles.pl0]}>
<View style={[styles.ph5, styles.pb5]}>
<Text style={[styles.textLabelSupporting, styles.lh16]}>{props.translate('common.to')}</Text>
<TouchableOpacity
<PressableWithFeedback
onPress={() => Navigation.navigate(ROUTES.getTaskReportAssigneeRoute(props.report.reportID))}
disabled={!isOpen}
accessibilityRole="button"
accessibilityLabel={props.translate('newTaskPage.assignee')}
hoverDimmingValue={1}
pressDimmingValue={0.2}
>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween, styles.pv3]}>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween]}>
Expand Down Expand Up @@ -97,7 +102,7 @@ function TaskHeader(props) {
)}
</View>
</View>
</TouchableOpacity>
</PressableWithFeedback>
</View>
</View>
<MenuItemWithTopDescription
Expand Down

0 comments on commit 96adb8e

Please sign in to comment.