diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 9b763120b30d..a1d9af454ca7 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -169,21 +169,21 @@ function WorkspacesListPage({policies, allPolicyMembers, reimbursementAccount, r } return ( - - - {({hovered}) => ( + {({hovered}) => ( + - )} - - + + )} + ); }, [isSmallScreenWidth, styles.mb3, styles.mh5, styles.ph5, styles.hoveredComponentBG, translate], diff --git a/src/pages/workspace/WorkspacesListRow.tsx b/src/pages/workspace/WorkspacesListRow.tsx index 2f74d265c004..f16dfd9f0aa1 100644 --- a/src/pages/workspace/WorkspacesListRow.tsx +++ b/src/pages/workspace/WorkspacesListRow.tsx @@ -44,11 +44,17 @@ type WorkspacesListRowProps = WithCurrentUserPersonalDetailsProps & { * component will return null to prevent layout from jumping on initial render and when parent width changes. */ layoutWidth?: ValueOf; - /** Additional styles applied to the row */ + /** Custom styles applied to the row */ rowStyles?: StyleProp; + /** Additional styles from OfflineWithFeedback applied to the row */ + style?: StyleProp; + /** The type of brick road indicator to show. */ brickRoadIndicator?: ValueOf; + + /** Determines if three dots menu should be shown or not */ + shouldDisableThreeDotsMenu?: boolean; }; type BrickRoadIndicatorIconProps = { @@ -89,7 +95,9 @@ function WorkspacesListRow({ currentUserPersonalDetails, layoutWidth = CONST.LAYOUT_WIDTH.NONE, rowStyles, + style, brickRoadIndicator, + shouldDisableThreeDotsMenu, }: WorkspacesListRowProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); @@ -120,8 +128,10 @@ function WorkspacesListRow({ const isWide = layoutWidth === CONST.LAYOUT_WIDTH.WIDE; const isNarrow = layoutWidth === CONST.LAYOUT_WIDTH.NARROW; + const isDeleted = style && Array.isArray(style) ? style.includes(styles.offlineFeedback.deleted) : false; + return ( - + {title} @@ -143,6 +153,7 @@ function WorkspacesListRow({ )} @@ -158,13 +169,13 @@ function WorkspacesListRow({ {PersonalDetailsUtils.getDisplayNameOrDefault(ownerDetails)} {ownerDetails.login} @@ -182,13 +193,13 @@ function WorkspacesListRow({ {userFriendlyWorkspaceType} {translate('workspace.common.plan')} @@ -215,6 +226,7 @@ function WorkspacesListRow({ anchorAlignment={{horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP}} iconStyles={[styles.mr2]} shouldOverlay + disabled={shouldDisableThreeDotsMenu} />