Skip to content

Commit

Permalink
fix padding and margin
Browse files Browse the repository at this point in the history
  • Loading branch information
LeahMarieBush committed Sep 12, 2024
1 parent 1967c96 commit e27cbbd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
display: flex;
justify-content: space-between;
margin-bottom: 12px;

&.rightAlign {
margin-bottom: 0;
}
}

.rightAlign {
justify-content: flex-end;
padding-right: 16px;
}

.levelUpButton {
Expand Down
9 changes: 7 additions & 2 deletions src/components/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const Sidebar = ({
() => addNavItemMetaData(currentPath, menuItems),
[currentPath, menuItems]
)
const isProductPanel = shouldRenderMobileControls && title === 'Main Menu'

let backToElement
if (shouldRenderMobileControls && levelButtonProps) {
Expand Down Expand Up @@ -135,7 +136,7 @@ const Sidebar = ({
showFilterInput={false}
/>
)
} else if (shouldRenderMobileControls && title === 'Main Menu') {
} else if (isProductPanel) {
sidebarContent = (
<>
<NavigationMenu.Root>
Expand Down Expand Up @@ -170,7 +171,11 @@ const Sidebar = ({
)
}
return (
<div className={classNames(s.sidebar, className)}>
<div
className={classNames(className, {
[s.sidebar]: !isProductPanel,
})}
>
{backToElement}
{sidebarFilterInput}
<nav
Expand Down
6 changes: 5 additions & 1 deletion src/layouts/sidebar-sidecar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ const SidebarSidecarLayoutContent = ({
<MobileMenuContainer className={s.sidebarContainer} ref={sidebarRef}>
<div className={s.sidebarContentWrapper}>
<MobileAuthenticationControls
className={classNames(s.mobileAuthControlsContainer, s.sidePadding)}
className={classNames(
s.mobileAuthControlsContainer,
s.sidePadding,
{ [s.noMargin]: AlternateSidebar && !sidebarProps?.menuItems }
)}
/>
<div
className={classNames({
Expand Down
4 changes: 4 additions & 0 deletions src/layouts/sidebar-sidecar/sidebar-sidecar-layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ for further details.

.mobileAuthControlsContainer {
padding-top: 24px;

&.noMargin {
margin-bottom: 0;
}
}

/**
Expand Down

0 comments on commit e27cbbd

Please sign in to comment.