Skip to content

Commit

Permalink
📐final alignment and hiding when no headings
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejpurves committed Aug 23, 2024
1 parent 6dd17ae commit 0c735a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/site/src/components/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const ConfigurablePrimaryNavigation = ({

return (
<>
{open && (
{open && !mobileOnly && headings && (
<div
className="fixed inset-0 z-30 bg-black opacity-50"
style={{ marginTop: top }}
Expand Down
8 changes: 4 additions & 4 deletions packages/site/src/components/Navigation/PrimarySidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ export const PrimarySidebar = ({
'pointer-events-auto',
'xl:col-margin-left flex-col',
'overflow-hidden',
'py-6 gap-6',
{
flex: open,
'bg-white dark:bg-stone-900': open, // just apply when open, so that theme can transition
'hidden xl:flex': !open && !mobileOnly,
hidden: !open && mobileOnly,
'lg:hidden': mobileOnly && !headings,
},
)}
>
<div className="flex-grow space-y-6 overflow-y-auto">
<div className="flex-grow py-6 overflow-y-auto">
{nav && (
<nav
aria-label="Navigation"
Expand All @@ -177,7 +177,7 @@ export const PrimarySidebar = ({
<SidebarNav nav={nav} />
</nav>
)}
{nav && headings && <div className="border-b-2 lg:hidden" />}
{nav && headings && <div className="my-3 border-b-2 lg:hidden" />}
{headings && (
<nav
aria-label="Table of Contents"
Expand All @@ -189,7 +189,7 @@ export const PrimarySidebar = ({
</div>
{footer && (
<div
className="flex-none py-4 transition-all duration-700 translate-y-6 opacity-0"
className="flex-none py-6 transition-all duration-700 translate-y-6 opacity-0"
ref={footerRef}
>
{footer}
Expand Down

0 comments on commit 0c735a3

Please sign in to comment.