From 499e1a09e3e9fc75290336c021b7c2147d727552 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 4 Apr 2024 19:19:26 +0200 Subject: [PATCH] Fix ScrollWrapper inner elements padding (#4827) Closes https://github.com/twentyhq/twenty/issues/4824 and https://github.com/twentyhq/twenty/issues/4788 --- .../src/modules/command-menu/components/CommandMenu.tsx | 3 ++- .../layout/dropdown/components/DropdownMenuItemsContainer.tsx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenu.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenu.tsx index a177a4a7936a..d198cbbf6397 100644 --- a/packages/twenty-front/src/modules/command-menu/components/CommandMenu.tsx +++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenu.tsx @@ -89,7 +89,8 @@ export const StyledList = styled.div` export const StyledInnerList = styled.div` padding-left: ${({ theme }) => theme.spacing(1)}; - width: 100%; + padding-right: ${({ theme }) => theme.spacing(1)}; + width: calc(100% - ${({ theme }) => theme.spacing(2)}); `; export const StyledEmpty = styled.div` diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx index 0eeeebfffcc5..89c0cef0eae8 100644 --- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx +++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx @@ -17,9 +17,8 @@ const StyledDropdownMenuItemsExternalContainer = styled.div<{ overflow-y: auto; padding: var(--padding); - padding-right: 0; - width: calc(100% - 1 * var(--padding)); + width: calc(100% - 2 * var(--padding)); `; const StyledScrollWrapper = styled(ScrollWrapper)`