fix(ui): remove sidebar layout space when sidebar is disabled (#2067)

This commit is contained in:
saintao
2025-07-09 17:16:07 +08:00
committed by GitHub
parent 542954f9f5
commit a2d79407d7
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-ui': patch
---
Fix layout: remove reserved sidebar space when sidebar is disabled in DocsLayout
+3 -1
View File
@@ -79,7 +79,9 @@ export function DocsLayout({
const links = getLinks(props.links ?? [], props.githubUrl);
const variables = cn(
'md:[--fd-sidebar-width:268px] lg:[--fd-sidebar-width:286px] xl:[--fd-toc-width:286px]',
sidebarEnabled &&
'md:[--fd-sidebar-width:268px] lg:[--fd-sidebar-width:286px]',
'xl:[--fd-toc-width:286px]',
!nav.component && nav.enabled !== false
? '[--fd-nav-height:56px] md:[--fd-nav-height:0px]'
: undefined,