From e252d750b674bb4ec61de838ca066f3bcc65ea03 Mon Sep 17 00:00:00 2001 From: Cong Pham Date: Sun, 17 Sep 2023 22:32:43 +0700 Subject: [PATCH 1/4] fix hightlight button when hovering --- src/components/AvatarCropModal/AvatarCropModal.js | 1 + src/components/DistanceRequest.js | 1 + src/components/MoneyRequestConfirmationList.js | 1 + src/components/PDFView/PDFPasswordForm.js | 1 + 4 files changed, 4 insertions(+) diff --git a/src/components/AvatarCropModal/AvatarCropModal.js b/src/components/AvatarCropModal/AvatarCropModal.js index baa958106f84..71cdc350ca38 100644 --- a/src/components/AvatarCropModal/AvatarCropModal.js +++ b/src/components/AvatarCropModal/AvatarCropModal.js @@ -426,6 +426,7 @@ function AvatarCropModal(props) { iconFill={themeColors.inverse} iconStyles={[styles.mr0]} onPress={rotateImage} + shouldUseDefaultHover /> diff --git a/src/components/DistanceRequest.js b/src/components/DistanceRequest.js index bf5a4cb9548b..f3f1085291d8 100644 --- a/src/components/DistanceRequest.js +++ b/src/components/DistanceRequest.js @@ -264,6 +264,7 @@ function DistanceRequest({iou, iouType, report, transaction, mapboxAccessToken, text={translate('distance.addStop')} isDisabled={numberOfWaypoints === MAX_WAYPOINTS} innerStyles={[styles.ph10]} + shouldUseDefaultHover /> diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index da98d324681e..3c3f788bf240 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -474,6 +474,7 @@ function MoneyRequestConfirmationList(props) { iconRight={Expensicons.DownArrow} iconFill={themeColors.icon} style={styles.mh0} + shouldUseDefaultHover /> diff --git a/src/components/PDFView/PDFPasswordForm.js b/src/components/PDFView/PDFPasswordForm.js index 29e6e2c49ec6..4ac79ab8d8b8 100644 --- a/src/components/PDFView/PDFPasswordForm.js +++ b/src/components/PDFView/PDFPasswordForm.js @@ -139,6 +139,7 @@ function PDFPasswordForm({isFocused, isPasswordInvalid, shouldShowLoadingIndicat style={styles.mt4} isLoading={shouldShowLoadingIndicator} pressOnEnter + shouldUseDefaultHover /> ) : ( From 1f2b4b434051ec0d998fe8ea728a55389a9ac1d2 Mon Sep 17 00:00:00 2001 From: Cong Pham Date: Thu, 21 Sep 2023 18:38:52 +0700 Subject: [PATCH 2/4] add default shouldUseDefaultHover for button --- src/components/AvatarCropModal/AvatarCropModal.js | 2 +- src/components/Button/index.js | 2 +- src/components/DistanceRequest.js | 1 - src/components/MoneyRequestConfirmationList.js | 1 - src/components/PDFView/PDFPasswordForm.js | 1 - 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/AvatarCropModal/AvatarCropModal.js b/src/components/AvatarCropModal/AvatarCropModal.js index 71cdc350ca38..689c95ac0751 100644 --- a/src/components/AvatarCropModal/AvatarCropModal.js +++ b/src/components/AvatarCropModal/AvatarCropModal.js @@ -426,7 +426,7 @@ function AvatarCropModal(props) { iconFill={themeColors.inverse} iconStyles={[styles.mr0]} onPress={rotateImage} - shouldUseDefaultHover + /> diff --git a/src/components/Button/index.js b/src/components/Button/index.js index bfde528a4750..ea1181b7e734 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -145,7 +145,7 @@ const defaultProps = { style: [], innerStyles: [], textStyles: [], - shouldUseDefaultHover: false, + shouldUseDefaultHover: true, success: false, danger: false, children: null, diff --git a/src/components/DistanceRequest.js b/src/components/DistanceRequest.js index f3f1085291d8..bf5a4cb9548b 100644 --- a/src/components/DistanceRequest.js +++ b/src/components/DistanceRequest.js @@ -264,7 +264,6 @@ function DistanceRequest({iou, iouType, report, transaction, mapboxAccessToken, text={translate('distance.addStop')} isDisabled={numberOfWaypoints === MAX_WAYPOINTS} innerStyles={[styles.ph10]} - shouldUseDefaultHover /> diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index 3c3f788bf240..da98d324681e 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -474,7 +474,6 @@ function MoneyRequestConfirmationList(props) { iconRight={Expensicons.DownArrow} iconFill={themeColors.icon} style={styles.mh0} - shouldUseDefaultHover /> diff --git a/src/components/PDFView/PDFPasswordForm.js b/src/components/PDFView/PDFPasswordForm.js index 4ac79ab8d8b8..29e6e2c49ec6 100644 --- a/src/components/PDFView/PDFPasswordForm.js +++ b/src/components/PDFView/PDFPasswordForm.js @@ -139,7 +139,6 @@ function PDFPasswordForm({isFocused, isPasswordInvalid, shouldShowLoadingIndicat style={styles.mt4} isLoading={shouldShowLoadingIndicator} pressOnEnter - shouldUseDefaultHover /> ) : ( From 450082f899b779a2378bc8acdd2fdfe017c9c474 Mon Sep 17 00:00:00 2001 From: Cong Pham Date: Thu, 21 Sep 2023 18:39:51 +0700 Subject: [PATCH 3/4] revert empty change --- src/components/AvatarCropModal/AvatarCropModal.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/AvatarCropModal/AvatarCropModal.js b/src/components/AvatarCropModal/AvatarCropModal.js index 689c95ac0751..baa958106f84 100644 --- a/src/components/AvatarCropModal/AvatarCropModal.js +++ b/src/components/AvatarCropModal/AvatarCropModal.js @@ -426,7 +426,6 @@ function AvatarCropModal(props) { iconFill={themeColors.inverse} iconStyles={[styles.mr0]} onPress={rotateImage} - /> From 493f5f6075d3c91fac1457486c917bfc3a6ef2f2 Mon Sep 17 00:00:00 2001 From: Cong Pham Date: Thu, 21 Sep 2023 20:28:31 +0700 Subject: [PATCH 4/4] cleanup redundant shouldUseDefaultHover prop --- src/components/ConfirmContent.js | 2 -- src/pages/settings/Wallet/WalletPage/BaseWalletPage.js | 1 - 2 files changed, 3 deletions(-) diff --git a/src/components/ConfirmContent.js b/src/components/ConfirmContent.js index 9a72d4e7d584..20a5275e37e8 100644 --- a/src/components/ConfirmContent.js +++ b/src/components/ConfirmContent.js @@ -133,7 +133,6 @@ function ConfirmContent(props) { style={[styles.mt3, styles.noSelect]} onPress={props.onCancel} text={props.cancelText || translate('common.no')} - shouldUseDefaultHover /> )} @@ -144,7 +143,6 @@ function ConfirmContent(props) { style={[styles.noSelect, styles.flex1]} onPress={props.onCancel} text={props.cancelText || translate('common.no')} - shouldUseDefaultHover medium /> )} diff --git a/src/pages/settings/Wallet/WalletPage/BaseWalletPage.js b/src/pages/settings/Wallet/WalletPage/BaseWalletPage.js index 1393892b6ef0..81ddc068d791 100644 --- a/src/pages/settings/Wallet/WalletPage/BaseWalletPage.js +++ b/src/pages/settings/Wallet/WalletPage/BaseWalletPage.js @@ -443,7 +443,6 @@ function BaseWalletPage(props) { onPress={navigateToAddPaypalRoute} style={[styles.mb4]} text={translate('common.edit')} - shouldUseDefaultHover /> )}