From cc1ca4e95954e39ec0d4bda8e6f20bc3ff4d85d0 Mon Sep 17 00:00:00 2001 From: Shubham Agrawal <58412969+shubham1206agra@users.noreply.github.com> Date: Wed, 13 Mar 2024 20:42:04 +0530 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Carlos Martins Co-authored-by: Ishpaul Singh <104348397+ishpaul777@users.noreply.github.com> --- src/components/SelectionList/BaseListItem.tsx | 6 +++--- src/components/SelectionList/types.ts | 4 ++-- src/pages/workspace/WorkspaceInvitePage.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 0ea868d6d24e..a7dafc37e467 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -24,7 +24,7 @@ function BaseListItem({ onCheckboxPress, onDismissError = () => {}, rightHandSideComponent, - checkmarkPosition = 'left', + checkmarkPosition = CONST.DIRECTION.LEFT, keyForList, errors, pendingAction, @@ -78,7 +78,7 @@ function BaseListItem({ style={pressableStyle} > - {canSelectMultiple && checkmarkPosition === 'left' && ( + {canSelectMultiple && checkmarkPosition === CONST.DIRECTION.LEFT && ( ({ {typeof children === 'function' ? children(hovered) : children} - {canSelectMultiple && checkmarkPosition === 'right' && ( + {canSelectMultiple && checkmarkPosition === CONST.DIRECTION.RIGHT && ( = { rightHandSideComponent?: ((item: TItem) => ReactElement) | ReactElement | null; /** Direction of checkmark to show */ - checkmarkPosition?: 'left' | 'right'; + checkmarkPosition?: ValueOf; /** Styles for the pressable component */ pressableStyle?: StyleProp; @@ -271,7 +271,7 @@ type BaseSelectionListProps = Partial & { rightHandSideComponent?: ((item: ListItem) => ReactElement) | ReactElement | null; /** Direction of checkmark to show */ - checkmarkPosition?: 'left' | 'right'; + checkmarkPosition?: ValueOf; /** Whether to show the loading indicator for new options */ isLoadingNewOptions?: boolean; diff --git a/src/pages/workspace/WorkspaceInvitePage.tsx b/src/pages/workspace/WorkspaceInvitePage.tsx index afca6c29aee8..00d7eaa33f6b 100644 --- a/src/pages/workspace/WorkspaceInvitePage.tsx +++ b/src/pages/workspace/WorkspaceInvitePage.tsx @@ -321,7 +321,7 @@ function WorkspaceInvitePage({ showScrollIndicator showLoadingPlaceholder={!didScreenTransitionEnd || !OptionsListUtils.isPersonalDetailsReady(personalDetailsProp)} shouldPreventDefaultFocusOnSelectRow={!DeviceCapabilities.canUseTouchScreen()} - checkmarkPosition="right" + checkmarkPosition={CONST.DIRECTION.RIGHT} />