Skip to content

Commit

Permalink
Merge pull request #6832 from PrashantMangukiya/prashant-6693
Browse files Browse the repository at this point in the history
Corrected - IOU Cursor is set to pointer in IOU preview
  • Loading branch information
stitesExpensify authored Dec 28, 2021
2 parents 9a55e51 + 7fbbb32 commit a5d3259
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/ReportActionItem/IOUAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes
import IOUPreview from './IOUPreview';
import Navigation from '../../libs/Navigation/Navigation';
import ROUTES from '../../ROUTES';
import styles from '../../styles/styles';

const propTypes = {
/** All the data of the action */
Expand Down Expand Up @@ -50,6 +51,7 @@ const IOUAction = (props) => {
chatReportID={props.chatReportID}
onPayButtonPressed={launchDetailsModal}
onPreviewPressed={launchDetailsModal}
containerStyles={[styles.cursorPointer]}
/>
)}
</>
Expand Down
10 changes: 9 additions & 1 deletion src/components/ReportActionItem/IOUPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ const propTypes = {
/** The associated chatReport */
chatReportID: PropTypes.number.isRequired,

/** Callback for the preview pressed */
onPreviewPressed: PropTypes.func,

/** Extra styles to pass to View wrapper */
containerStyles: PropTypes.arrayOf(PropTypes.object),

/* Onyx Props */

/** Active IOU Report for current report */
Expand Down Expand Up @@ -72,6 +78,8 @@ const defaultProps = {
iouReport: {},
shouldHidePayButton: false,
onPayButtonPressed: null,
onPreviewPressed: () => {},
containerStyles: [],
};

const IOUPreview = (props) => {
Expand Down Expand Up @@ -103,7 +111,7 @@ const IOUPreview = (props) => {
const cachedTotal = props.iouReport.cachedTotal ? props.iouReport.cachedTotal.replace(/[()]/g, '') : '';
return (
<TouchableWithoutFeedback onPress={props.onPreviewPressed}>
<View style={styles.iouPreviewBox}>
<View style={[styles.iouPreviewBox, ...props.containerStyles]}>
{reportIsLoading
? <ActivityIndicator style={styles.iouPreviewBoxLoading} color={themeColors.text} />
: (
Expand Down
1 change: 0 additions & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,6 @@ const styles = {
marginTop: 16,
maxWidth: variables.sideBarWidth,
width: '100%',
cursor: 'pointer',
},

iouPreviewBoxLoading: {
Expand Down

0 comments on commit a5d3259

Please sign in to comment.