Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected - IOU Cursor is set to pointer in IOU preview #6832

Merged
merged 2 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
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
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