Skip to content

Commit

Permalink
Changed the prop name to checkmarkPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1206agra committed Mar 13, 2024
1 parent 9d5cec2 commit 3d51305
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/components/SelectionList/BaseListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function BaseListItem<TItem extends ListItem>({
onCheckboxPress,
onDismissError = () => {},
rightHandSideComponent,
checkmarkDirection = 'left',
checkmarkPosition = 'left',
keyForList,
errors,
pendingAction,
Expand Down Expand Up @@ -78,7 +78,7 @@ function BaseListItem<TItem extends ListItem>({
style={pressableStyle}
>
<View style={wrapperStyle}>
{canSelectMultiple && checkmarkDirection === 'left' && (
{canSelectMultiple && checkmarkPosition === 'left' && (
<PressableWithFeedback
accessibilityLabel={item.text ?? ''}
role={CONST.ROLE.BUTTON}
Expand All @@ -101,7 +101,7 @@ function BaseListItem<TItem extends ListItem>({

{typeof children === 'function' ? children(hovered) : children}

{canSelectMultiple && checkmarkDirection === 'right' && (
{canSelectMultiple && checkmarkPosition === 'right' && (
<PressableWithFeedback
onPress={handleCheckboxPress}
disabled={isDisabled}
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function BaseSelectionList<TItem extends ListItem>(
shouldShowTooltips = true,
shouldUseDynamicMaxToRenderPerBatch = false,
rightHandSideComponent,
checkmarkDirection,
checkmarkPosition,
isLoadingNewOptions = false,
onLayout,
customListHeader,
Expand Down Expand Up @@ -330,7 +330,7 @@ function BaseSelectionList<TItem extends ListItem>(
onDismissError={() => onDismissError?.(item)}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
rightHandSideComponent={rightHandSideComponent}
checkmarkDirection={checkmarkDirection}
checkmarkPosition={checkmarkPosition}
keyForList={item.keyForList ?? ''}
isMultilineSupported={isRowMultilineSupported}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectionList/RadioListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function RadioListItem({
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
rightHandSideComponent,
checkmarkDirection,
checkmarkPosition,
isMultilineSupported = false,
}: RadioListItemProps) {
const styles = useThemeStyles();
Expand All @@ -37,7 +37,7 @@ function RadioListItem({
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
rightHandSideComponent={rightHandSideComponent}
checkmarkDirection={checkmarkDirection}
checkmarkPosition={checkmarkPosition}
keyForList={item.keyForList}
>
<>
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectionList/TableListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function TableListItem({
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
rightHandSideComponent,
checkmarkDirection,
checkmarkPosition,
}: TableListItemProps) {
const styles = useThemeStyles();
const theme = useTheme();
Expand All @@ -43,7 +43,7 @@ function TableListItem({
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
rightHandSideComponent={rightHandSideComponent}
checkmarkDirection={checkmarkDirection}
checkmarkPosition={checkmarkPosition}
errors={item.errors}
pendingAction={item.pendingAction}
keyForList={item.keyForList}
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectionList/UserListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function UserListItem({
onDismissError,
shouldPreventDefaultFocusOnSelectRow,
rightHandSideComponent,
checkmarkDirection,
checkmarkPosition,
}: UserListItemProps) {
const styles = useThemeStyles();
const theme = useTheme();
Expand All @@ -48,7 +48,7 @@ function UserListItem({
onDismissError={onDismissError}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
rightHandSideComponent={rightHandSideComponent}
checkmarkDirection={checkmarkDirection}
checkmarkPosition={checkmarkPosition}
errors={item.errors}
pendingAction={item.pendingAction}
FooterComponent={
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectionList/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type CommonListItemProps<TItem> = {
rightHandSideComponent?: ((item: TItem) => ReactElement<TItem>) | ReactElement | null;

/** Direction of checkmark to show */
checkmarkDirection?: 'left' | 'right';
checkmarkPosition?: 'left' | 'right';

/** Styles for the pressable component */
pressableStyle?: StyleProp<ViewStyle>;
Expand Down Expand Up @@ -271,7 +271,7 @@ type BaseSelectionListProps<TItem extends ListItem> = Partial<ChildrenProps> & {
rightHandSideComponent?: ((item: ListItem) => ReactElement<ListItem>) | ReactElement | null;

/** Direction of checkmark to show */
checkmarkDirection?: 'left' | 'right';
checkmarkPosition?: 'left' | 'right';

/** Whether to show the loading indicator for new options */
isLoadingNewOptions?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function WorkspaceInvitePage({
showScrollIndicator
showLoadingPlaceholder={!didScreenTransitionEnd || !OptionsListUtils.isPersonalDetailsReady(personalDetailsProp)}
shouldPreventDefaultFocusOnSelectRow={!DeviceCapabilities.canUseTouchScreen()}
checkmarkDirection="right"
checkmarkPosition="right"
/>
<View style={[styles.flexShrink0]}>
<FormAlertWithSubmitButton
Expand Down

0 comments on commit 3d51305

Please sign in to comment.