From 7410110700c96c814bd5f330fd6baa0b3f7242cb Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 25 Feb 2025 12:02:41 +0700 Subject: [PATCH 1/3] fix visual feedback on To field --- .../implementation/BaseGenericPressable.tsx | 5 +++-- src/components/Pressable/GenericPressable/types.ts | 5 +++++ src/components/SelectionList/BaseListItem.tsx | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx b/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx index 1765560eaae3..d04ba6190f1c 100644 --- a/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx +++ b/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx @@ -37,6 +37,7 @@ function GenericPressable( accessible = true, fullDisabled = false, interactive = true, + isNested = false, ...rest }: PressableProps, ref: PressableRef, @@ -74,11 +75,11 @@ function GenericPressable( if (shouldUseDisabledCursor) { return styles.cursorDisabled; } - if ([rest.accessibilityRole, rest.role].includes(CONST.ROLE.PRESENTATION)) { + if ([rest.accessibilityRole, rest.role].includes(CONST.ROLE.PRESENTATION) && !isNested) { return styles.cursorText; } return styles.cursorPointer; - }, [styles, shouldUseDisabledCursor, rest.accessibilityRole, rest.role, interactive]); + }, [interactive, shouldUseDisabledCursor, rest.accessibilityRole, rest.role, isNested, styles.cursorPointer, styles.cursorDefault, styles.cursorDisabled, styles.cursorText]); const onLongPressHandler = useCallback( (event: GestureResponderEvent) => { diff --git a/src/components/Pressable/GenericPressable/types.ts b/src/components/Pressable/GenericPressable/types.ts index 61cb6db8ee76..5073b730a588 100644 --- a/src/components/Pressable/GenericPressable/types.ts +++ b/src/components/Pressable/GenericPressable/types.ts @@ -148,6 +148,11 @@ type PressableProps = RNPressableProps & * e.g., show disabled cursor when disabled */ interactive?: boolean; + + /** + * Whether the pressable is nested in another one. + */ + isNested?: boolean; }; type PressableRef = ForwardedRef; diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 99b6f8d5c53e..9a04599c599b 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -1,6 +1,6 @@ import React, {useRef} from 'react'; import {View} from 'react-native'; -import {getButtonRole, getButtonStyle} from '@components/Button/utils'; +import {getButtonRole} from '@components/Button/utils'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import OfflineWithFeedback from '@components/OfflineWithFeedback'; @@ -11,6 +11,7 @@ import useStyleUtils from '@hooks/useStyleUtils'; import useSyncFocus from '@hooks/useSyncFocus'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; +import variables from '@styles/variables'; import CONST from '@src/CONST'; import type {BaseListItemProps, ListItem} from './types'; @@ -96,7 +97,9 @@ function BaseListItem({ interactive={item.isInteractive} accessibilityLabel={item.text ?? ''} role={getButtonRole(true)} + isNested hoverDimmingValue={1} + pressDimmingValue={item.isInteractive === false ? 1 : variables.pressDimValue} hoverStyle={[!item.isDisabled && item.isInteractive !== false && styles.hoveredComponentBG, hoverStyle]} dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: shouldShowBlueBorderOnFocus}} onMouseDown={(e) => e.preventDefault()} @@ -104,7 +107,6 @@ function BaseListItem({ style={[ pressableStyle, isFocused && StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, !!isFocused, !!item.isDisabled, theme.activeComponentBG, theme.hoverComponentBG), - getButtonStyle(styles, true), ]} onFocus={onFocus} onMouseLeave={handleMouseLeave} From 46240aa03f4b7a57d43b9101af83bfd473156175 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Tue, 25 Feb 2025 16:40:26 +0700 Subject: [PATCH 2/3] remove getButtonStyles function --- src/components/AvatarWithDisplayName.tsx | 2 +- src/components/Button/index.tsx | 4 ++-- src/components/Button/utils/index.ts | 5 ++--- src/components/Button/utils/index.web.ts | 5 ++--- src/components/Button/utils/types.ts | 6 ++---- .../HTMLRenderers/ImageRenderer.tsx | 5 +++-- src/components/ReferralProgramCTA.tsx | 15 +++------------ src/components/ReportActionItem/ReportPreview.tsx | 5 +++-- src/components/SelectionList/BaseListItem.tsx | 2 +- .../Search/ExpenseItemHeaderNarrow.tsx | 2 +- .../Search/TransactionListItemRow.tsx | 5 +++-- src/components/ThreeDotsMenu/index.tsx | 5 +++-- 12 files changed, 26 insertions(+), 35 deletions(-) diff --git a/src/components/AvatarWithDisplayName.tsx b/src/components/AvatarWithDisplayName.tsx index a8b3e1d35119..b3f332ae6437 100644 --- a/src/components/AvatarWithDisplayName.tsx +++ b/src/components/AvatarWithDisplayName.tsx @@ -29,7 +29,7 @@ import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {Policy, Report} from '@src/types/onyx'; import type {Icon} from '@src/types/onyx/OnyxCommon'; -import {getButtonRole} from './Button/utils'; +import getButtonRole from './Button/utils'; import CaretWrapper from './CaretWrapper'; import DisplayNames from './DisplayNames'; import {FallbackAvatar} from './Icon/Expensicons'; diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 76ba73152335..f55960a3d422 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -17,7 +17,7 @@ import HapticFeedback from '@libs/HapticFeedback'; import CONST from '@src/CONST'; import type ChildrenProps from '@src/types/utils/ChildrenProps'; import type IconAsset from '@src/types/utils/IconAsset'; -import {getButtonRole, getButtonStyle} from './utils'; +import getButtonRole from './utils'; import validateSubmitShortcut from './validateSubmitShortcut'; type ButtonProps = Partial & { @@ -422,8 +422,8 @@ function Button( text && shouldShowRightIcon ? styles.alignItemsStretch : undefined, innerStyles, link && styles.bgTransparent, - getButtonStyle(styles, isNested), ]} + isNested={isNested} hoverStyle={[ shouldUseDefaultHover && !isDisabled ? styles.buttonDefaultHovered : undefined, success && !isDisabled ? styles.buttonSuccessHovered : undefined, diff --git a/src/components/Button/utils/index.ts b/src/components/Button/utils/index.ts index 4eeafe89dc19..411e4d24411f 100644 --- a/src/components/Button/utils/index.ts +++ b/src/components/Button/utils/index.ts @@ -1,6 +1,5 @@ import CONST from '@src/CONST'; -import type {GetButtonRole, GetButtonStyle} from './types'; +import type GetButtonRole from './types'; -const getButtonStyle: GetButtonStyle = () => undefined; const getButtonRole: GetButtonRole = () => CONST.ROLE.BUTTON; -export {getButtonStyle, getButtonRole}; +export default getButtonRole; diff --git a/src/components/Button/utils/index.web.ts b/src/components/Button/utils/index.web.ts index 0eb9740e69bd..bf90c7553b50 100644 --- a/src/components/Button/utils/index.web.ts +++ b/src/components/Button/utils/index.web.ts @@ -1,7 +1,6 @@ import CONST from '@src/CONST'; -import type {GetButtonRole, GetButtonStyle} from './types'; +import type GetButtonRole from './types'; -const getButtonStyle: GetButtonStyle = (styles, isNested) => (isNested ? styles.cursorPointer : undefined); const getButtonRole: GetButtonRole = (isNested) => (isNested ? CONST.ROLE.PRESENTATION : CONST.ROLE.BUTTON); -export {getButtonStyle, getButtonRole}; +export default getButtonRole; diff --git a/src/components/Button/utils/types.ts b/src/components/Button/utils/types.ts index 06d7a54a2073..e4f1621b936a 100644 --- a/src/components/Button/utils/types.ts +++ b/src/components/Button/utils/types.ts @@ -1,7 +1,5 @@ -import type {Role, StyleProp, ViewStyle} from 'react-native'; - -type GetButtonStyle = (styles: {cursorPointer: ViewStyle}, isNested: boolean) => StyleProp | undefined; +import type {Role} from 'react-native'; type GetButtonRole = (isNested: boolean) => Role | undefined; -export type {GetButtonStyle, GetButtonRole}; +export default GetButtonRole; diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx index d9d079549d8d..38edadab889a 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx +++ b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx @@ -3,7 +3,7 @@ import {useOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import type {CustomRendererProps, TBlock} from 'react-native-render-html'; import {AttachmentContext} from '@components/AttachmentContext'; -import {getButtonRole, getButtonStyle} from '@components/Button/utils'; +import getButtonRole from '@components/Button/utils'; import {isDeletedNode} from '@components/HTMLEngineProvider/htmlEngineUtils'; import * as Expensicons from '@components/Icon/Expensicons'; import PressableWithoutFocus from '@components/Pressable/PressableWithoutFocus'; @@ -104,7 +104,7 @@ function ImageRenderer({tnode}: ImageRendererProps) { {({reportID, accountID, type}) => ( { if (!source || !type) { return; @@ -120,6 +120,7 @@ function ImageRenderer({tnode}: ImageRendererProps) { } showContextMenuForReport(event, anchor, report?.reportID, action, checkIfContextMenuActive, isArchivedNonExpenseReport(report, reportNameValuePairs)); }} + isNested shouldUseHapticsOnLongPress role={getButtonRole(true)} accessibilityLabel={translate('accessibilityHints.viewAttachment')} diff --git a/src/components/ReferralProgramCTA.tsx b/src/components/ReferralProgramCTA.tsx index b2ceac58e43d..0355e3ff4ba7 100644 --- a/src/components/ReferralProgramCTA.tsx +++ b/src/components/ReferralProgramCTA.tsx @@ -7,7 +7,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; import Navigation from '@src/libs/Navigation/Navigation'; import ROUTES from '@src/ROUTES'; -import {getButtonRole, getButtonStyle} from './Button/utils'; +import getButtonRole from './Button/utils'; import Icon from './Icon'; import {Close} from './Icon/Expensicons'; import {PressableWithoutFeedback} from './Pressable'; @@ -53,17 +53,8 @@ function ReferralProgramCTA({referralContentType, style, onDismiss}: ReferralPro onPress={() => { Navigation.navigate(ROUTES.REFERRAL_DETAILS_MODAL.getRoute(referralContentType, Navigation.getActiveRouteWithoutParams())); }} - style={[ - styles.br2, - styles.highlightBG, - styles.flexRow, - styles.justifyContentBetween, - styles.alignItemsCenter, - {gap: 10, padding: 10}, - styles.pl5, - getButtonStyle(styles, true), - style, - ]} + style={[styles.br2, styles.highlightBG, styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter, {gap: 10, padding: 10}, styles.pl5, style]} + isNested accessibilityLabel="referral" role={getButtonRole(true)} > diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 70599e5efb86..39a58bc944d4 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -5,7 +5,7 @@ import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import Animated, {useAnimatedStyle, useSharedValue, withDelay, withSpring, withTiming} from 'react-native-reanimated'; import Button from '@components/Button'; -import {getButtonRole, getButtonStyle} from '@components/Button/utils'; +import getButtonRole from '@components/Button/utils'; import DelegateNoAccessModal from '@components/DelegateNoAccessModal'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; @@ -539,8 +539,9 @@ function ReportPreview({ onLongPress={(event) => showContextMenuForReport(event, contextMenuAnchor, chatReportID, action, checkIfContextMenuActive)} shouldUseHapticsOnLongPress // This is added to omit console error about nested buttons as its forbidden on web platform - style={[styles.flexRow, styles.justifyContentBetween, styles.reportPreviewBox, getButtonStyle(styles, true)]} + style={[styles.flexRow, styles.justifyContentBetween, styles.reportPreviewBox]} role={getButtonRole(true)} + isNested accessibilityLabel={translate('iou.viewDetails')} > diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 9a04599c599b..25121abdbc25 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -1,6 +1,6 @@ import React, {useRef} from 'react'; import {View} from 'react-native'; -import {getButtonRole} from '@components/Button/utils'; +import getButtonRole from '@components/Button/utils'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import OfflineWithFeedback from '@components/OfflineWithFeedback'; diff --git a/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx b/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx index 341d46d8bda0..069836ec56c4 100644 --- a/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx +++ b/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx @@ -1,7 +1,7 @@ import React, {memo} from 'react'; import {View} from 'react-native'; import type {StyleProp, ViewStyle} from 'react-native'; -import {getButtonRole} from '@components/Button/utils'; +import getButtonRole from '@components/Button/utils'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import {PressableWithFeedback} from '@components/Pressable'; diff --git a/src/components/SelectionList/Search/TransactionListItemRow.tsx b/src/components/SelectionList/Search/TransactionListItemRow.tsx index abd29640f571..b857e6f46088 100644 --- a/src/components/SelectionList/Search/TransactionListItemRow.tsx +++ b/src/components/SelectionList/Search/TransactionListItemRow.tsx @@ -2,7 +2,7 @@ import {Str} from 'expensify-common'; import React from 'react'; import type {StyleProp, ViewStyle} from 'react-native'; import {View} from 'react-native'; -import {getButtonRole, getButtonStyle} from '@components/Button/utils'; +import getButtonRole from '@components/Button/utils'; import Checkbox from '@components/Checkbox'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; @@ -302,7 +302,8 @@ function TransactionListItemRow({ role={getButtonRole(true)} disabled={isDisabled} onPress={onCheckboxPress} - style={[styles.cursorUnset, StyleUtils.getCheckboxPressableStyle(), item.isDisabledCheckbox && styles.cursorDisabled, styles.mr1, getButtonStyle(styles, true)]} + isNested + style={[styles.cursorUnset, StyleUtils.getCheckboxPressableStyle(), item.isDisabledCheckbox && styles.cursorDisabled, styles.mr1]} > {!!item.isSelected && ( diff --git a/src/components/ThreeDotsMenu/index.tsx b/src/components/ThreeDotsMenu/index.tsx index 6dc44be378e5..3becf067d952 100644 --- a/src/components/ThreeDotsMenu/index.tsx +++ b/src/components/ThreeDotsMenu/index.tsx @@ -1,7 +1,7 @@ import React, {useEffect, useRef, useState} from 'react'; import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; -import {getButtonRole, getButtonStyle} from '@components/Button/utils'; +import getButtonRole from '@components/Button/utils'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import PopoverMenu from '@components/PopoverMenu'; @@ -106,8 +106,9 @@ function ThreeDotsMenu({ e.preventDefault(); }} ref={buttonRef} - style={[styles.touchableButtonImage, iconStyles, getButtonStyle(styles, isNested)]} + style={[styles.touchableButtonImage, iconStyles]} role={getButtonRole(isNested)} + isNested={isNested} accessibilityLabel={translate(iconTooltip)} > Date: Tue, 25 Feb 2025 21:53:10 +0700 Subject: [PATCH 3/3] update export --- src/components/AvatarWithDisplayName.tsx | 2 +- src/components/Button/index.tsx | 2 +- src/components/Button/utils/index.ts | 6 ++++-- src/components/Button/utils/index.web.ts | 5 +++-- src/components/Button/utils/types.ts | 3 ++- .../HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx | 2 +- src/components/ReferralProgramCTA.tsx | 2 +- src/components/ReportActionItem/ReportPreview.tsx | 2 +- src/components/SelectionList/BaseListItem.tsx | 2 +- .../SelectionList/Search/ExpenseItemHeaderNarrow.tsx | 2 +- .../SelectionList/Search/TransactionListItemRow.tsx | 2 +- src/components/ThreeDotsMenu/index.tsx | 2 +- 12 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/AvatarWithDisplayName.tsx b/src/components/AvatarWithDisplayName.tsx index b3f332ae6437..a8b3e1d35119 100644 --- a/src/components/AvatarWithDisplayName.tsx +++ b/src/components/AvatarWithDisplayName.tsx @@ -29,7 +29,7 @@ import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {Policy, Report} from '@src/types/onyx'; import type {Icon} from '@src/types/onyx/OnyxCommon'; -import getButtonRole from './Button/utils'; +import {getButtonRole} from './Button/utils'; import CaretWrapper from './CaretWrapper'; import DisplayNames from './DisplayNames'; import {FallbackAvatar} from './Icon/Expensicons'; diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index f55960a3d422..5baba39107ac 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -17,7 +17,7 @@ import HapticFeedback from '@libs/HapticFeedback'; import CONST from '@src/CONST'; import type ChildrenProps from '@src/types/utils/ChildrenProps'; import type IconAsset from '@src/types/utils/IconAsset'; -import getButtonRole from './utils'; +import {getButtonRole} from './utils'; import validateSubmitShortcut from './validateSubmitShortcut'; type ButtonProps = Partial & { diff --git a/src/components/Button/utils/index.ts b/src/components/Button/utils/index.ts index 411e4d24411f..16aee4cb19cb 100644 --- a/src/components/Button/utils/index.ts +++ b/src/components/Button/utils/index.ts @@ -1,5 +1,7 @@ import CONST from '@src/CONST'; -import type GetButtonRole from './types'; +import type {GetButtonRole} from './types'; const getButtonRole: GetButtonRole = () => CONST.ROLE.BUTTON; -export default getButtonRole; + +// eslint-disable-next-line import/prefer-default-export +export {getButtonRole}; diff --git a/src/components/Button/utils/index.web.ts b/src/components/Button/utils/index.web.ts index bf90c7553b50..3235b10e35bd 100644 --- a/src/components/Button/utils/index.web.ts +++ b/src/components/Button/utils/index.web.ts @@ -1,6 +1,7 @@ import CONST from '@src/CONST'; -import type GetButtonRole from './types'; +import type {GetButtonRole} from './types'; const getButtonRole: GetButtonRole = (isNested) => (isNested ? CONST.ROLE.PRESENTATION : CONST.ROLE.BUTTON); -export default getButtonRole; +// eslint-disable-next-line import/prefer-default-export +export {getButtonRole}; diff --git a/src/components/Button/utils/types.ts b/src/components/Button/utils/types.ts index e4f1621b936a..4ebf9f93fb38 100644 --- a/src/components/Button/utils/types.ts +++ b/src/components/Button/utils/types.ts @@ -2,4 +2,5 @@ import type {Role} from 'react-native'; type GetButtonRole = (isNested: boolean) => Role | undefined; -export default GetButtonRole; +// eslint-disable-next-line import/prefer-default-export +export type {GetButtonRole}; diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx index 38edadab889a..b1d5ac74540f 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx +++ b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx @@ -3,7 +3,7 @@ import {useOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; import type {CustomRendererProps, TBlock} from 'react-native-render-html'; import {AttachmentContext} from '@components/AttachmentContext'; -import getButtonRole from '@components/Button/utils'; +import {getButtonRole} from '@components/Button/utils'; import {isDeletedNode} from '@components/HTMLEngineProvider/htmlEngineUtils'; import * as Expensicons from '@components/Icon/Expensicons'; import PressableWithoutFocus from '@components/Pressable/PressableWithoutFocus'; diff --git a/src/components/ReferralProgramCTA.tsx b/src/components/ReferralProgramCTA.tsx index 0355e3ff4ba7..c532a1481473 100644 --- a/src/components/ReferralProgramCTA.tsx +++ b/src/components/ReferralProgramCTA.tsx @@ -7,7 +7,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; import Navigation from '@src/libs/Navigation/Navigation'; import ROUTES from '@src/ROUTES'; -import getButtonRole from './Button/utils'; +import {getButtonRole} from './Button/utils'; import Icon from './Icon'; import {Close} from './Icon/Expensicons'; import {PressableWithoutFeedback} from './Pressable'; diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 39a58bc944d4..fe9442b1a9a7 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -5,7 +5,7 @@ import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import Animated, {useAnimatedStyle, useSharedValue, withDelay, withSpring, withTiming} from 'react-native-reanimated'; import Button from '@components/Button'; -import getButtonRole from '@components/Button/utils'; +import {getButtonRole} from '@components/Button/utils'; import DelegateNoAccessModal from '@components/DelegateNoAccessModal'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 25121abdbc25..9a04599c599b 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -1,6 +1,6 @@ import React, {useRef} from 'react'; import {View} from 'react-native'; -import getButtonRole from '@components/Button/utils'; +import {getButtonRole} from '@components/Button/utils'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import OfflineWithFeedback from '@components/OfflineWithFeedback'; diff --git a/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx b/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx index 069836ec56c4..341d46d8bda0 100644 --- a/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx +++ b/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx @@ -1,7 +1,7 @@ import React, {memo} from 'react'; import {View} from 'react-native'; import type {StyleProp, ViewStyle} from 'react-native'; -import getButtonRole from '@components/Button/utils'; +import {getButtonRole} from '@components/Button/utils'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import {PressableWithFeedback} from '@components/Pressable'; diff --git a/src/components/SelectionList/Search/TransactionListItemRow.tsx b/src/components/SelectionList/Search/TransactionListItemRow.tsx index b857e6f46088..bd7fb5071e94 100644 --- a/src/components/SelectionList/Search/TransactionListItemRow.tsx +++ b/src/components/SelectionList/Search/TransactionListItemRow.tsx @@ -2,7 +2,7 @@ import {Str} from 'expensify-common'; import React from 'react'; import type {StyleProp, ViewStyle} from 'react-native'; import {View} from 'react-native'; -import getButtonRole from '@components/Button/utils'; +import {getButtonRole} from '@components/Button/utils'; import Checkbox from '@components/Checkbox'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; diff --git a/src/components/ThreeDotsMenu/index.tsx b/src/components/ThreeDotsMenu/index.tsx index 3becf067d952..79528b02c56d 100644 --- a/src/components/ThreeDotsMenu/index.tsx +++ b/src/components/ThreeDotsMenu/index.tsx @@ -1,7 +1,7 @@ import React, {useEffect, useRef, useState} from 'react'; import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; -import getButtonRole from '@components/Button/utils'; +import {getButtonRole} from '@components/Button/utils'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import PopoverMenu from '@components/PopoverMenu';