From 841ce4ffba2dca10d88acddbca0469eb8eec85ce Mon Sep 17 00:00:00 2001 From: Blake Stoddard Date: Wed, 30 Nov 2022 14:01:32 -0500 Subject: [PATCH] align sidebar icons properly right now they're off because the div is consuming the default mui line height of 1.43 and adding pixels to the bottom of the div Signed-off-by: Blake Stoddard --- packages/core-components/src/layout/Sidebar/Items.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core-components/src/layout/Sidebar/Items.tsx b/packages/core-components/src/layout/Sidebar/Items.tsx index 031b1e5168..85335bf05a 100644 --- a/packages/core-components/src/layout/Sidebar/Items.tsx +++ b/packages/core-components/src/layout/Sidebar/Items.tsx @@ -140,6 +140,7 @@ const makeSidebarStyles = (sidebarConfig: SidebarConfig) => display: 'flex', alignItems: 'center', justifyContent: 'center', + lineHeight: '0', }, searchRoot: { marginBottom: 12, @@ -371,12 +372,14 @@ const SidebarItemBase = forwardRef((props, ref) => { const { isOpen } = useSidebarOpenState(); const divStyle = - !isOpen && hasSubmenu ? { display: 'flex', marginLeft: '24px' } : {}; + !isOpen && hasSubmenu + ? { display: 'flex', marginLeft: '20px' } + : { lineHeight: '0' }; const displayItemIcon = ( - {!isOpen && hasSubmenu ? : <>} + {!isOpen && hasSubmenu ? : <>} );