Skip to content

Commit

Permalink
fix padding
Browse files Browse the repository at this point in the history
  • Loading branch information
LeahMarieBush committed Sep 12, 2024
1 parent 50a82a5 commit 9cb20f6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
14 changes: 12 additions & 2 deletions src/layouts/sidebar-sidecar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,24 @@ const SidebarSidecarLayoutContent = ({
sidebarContent = <Sidebar {...sidebarProps} />
}

const shouldNotHaveSidePadding =
sidebarContent.props.title === 'Main Menu' ||
(AlternateSidebar && !sidebarProps?.menuItems)

return (
<div className={classNames(s.root, s[`mainWidth-${mainWidth}`])}>
<MobileMenuContainer className={s.sidebarContainer} ref={sidebarRef}>
<div className={s.sidebarContentWrapper}>
<MobileAuthenticationControls
className={s.mobileAuthControlsContainer}
className={classNames(s.mobileAuthControlsContainer, s.sidePadding)}
/>
{sidebarContent}
<div
className={classNames({
[s.sidePadding]: !shouldNotHaveSidePadding,
})}
>
{sidebarContent}
</div>
</div>
</MobileMenuContainer>
<div className={s.contentWrapper} ref={contentRef}>
Expand Down
7 changes: 5 additions & 2 deletions src/layouts/sidebar-sidecar/sidebar-sidecar-layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ for further details.
flex-grow: 1;
overflow-y: auto;
position: relative;
padding-left: 16px;
padding-right: 16px;

@media (--dev-dot-hide-mobile-menu) {
padding-top: 24px;
Expand Down Expand Up @@ -197,3 +195,8 @@ for further details.
.editOnGithubLink {
margin-top: 64px;
}

.sidePadding {
padding-left: 16px;
padding-right: 16px;
}

0 comments on commit 9cb20f6

Please sign in to comment.