From e89a1e46de212181b30ec34dfd39c9dece488342 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Mon, 18 Mar 2024 01:26:17 +0530 Subject: [PATCH] fix: Workspace - Error message is left and bottom aligned in WS menus. Signed-off-by: Krishna Gupta --- src/components/SelectionList/BaseListItem.tsx | 2 ++ .../SelectionList/TableListItem.tsx | 1 + src/components/SelectionList/types.ts | 3 ++ src/pages/workspace/WorkspacesListPage.tsx | 35 ++++++++++--------- src/styles/index.ts | 1 - 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 303b90a682e6..6acb9284db6b 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -16,6 +16,7 @@ function BaseListItem({ item, pressableStyle, wrapperStyle, + containerStyle, selectMultipleStyle, isDisabled = false, shouldPreventDefaultFocusOnSelectRow = false, @@ -62,6 +63,7 @@ function BaseListItem({ pendingAction={pendingAction} errors={errors} errorRowStyles={styles.ph5} + style={containerStyle} > = { /** Styles for the wrapper view */ wrapperStyle?: StyleProp; + /** Styles for the container view */ + containerStyle?: StyleProp; + /** Styles for the checkbox wrapper view if select multiple option is on */ selectMultipleStyle?: StyleProp; diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 02fe06e29ab3..549d307b2a2f 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -182,21 +182,22 @@ function WorkspacesListPage({policies, allPolicyMembers, reimbursementAccount, r } return ( - - {({hovered}) => ( - + + {({hovered}) => ( - - )} - + )} + + ); }, [isLessThanMediumScreen, styles.mb3, styles.mh5, styles.ph5, styles.hoveredComponentBG, translate], diff --git a/src/styles/index.ts b/src/styles/index.ts index df89cd823fa4..fc8b3427498a 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -4307,7 +4307,6 @@ const styles = (theme: ThemeColors) => paddingHorizontal: 16, paddingVertical: 16, marginHorizontal: 20, - marginBottom: 12, backgroundColor: theme.highlightBG, borderRadius: 8, },