diff --git a/.changeset/dirty-bees-explode.md b/.changeset/dirty-bees-explode.md new file mode 100644 index 0000000000..0df3bc3b3e --- /dev/null +++ b/.changeset/dirty-bees-explode.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Update sidebar icon alignment 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 ? : <>} );