fix(ui): hide mobile sidebar trigger when sidebar is disabled (#2060)

* fix(ui): hide mobile sidebar trigger when sidebar is disabled

- Add sidebarEnabled prop to NavbarSidebarTrigger component
- Conditionally render trigger based on sidebar state
- Apply fix across docs, notebook, and registry layouts
- Prevents unnecessary UI element when sidebar functionality is disabled

* remove unsupported options from Notebook

---------

Co-authored-by: Fuma Nama <[email protected]>
This commit is contained in:
saintao
2025-07-08 15:56:32 +08:00
committed by GitHub
co-authored by Fuma Nama
parent 1d4fa2cee8
commit 1e508893de
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-ui': patch
---
Fix mobile sidebar trigger visibility when sidebar is disabled
+3 -1
View File
@@ -189,7 +189,9 @@ export function DocsLayout({
(searchToggle.components?.sm ?? (
<SearchToggle className="p-2" hideIfDisabled />
))}
<NavbarSidebarTrigger className="p-2 -me-1.5 md:hidden" />
{sidebarEnabled && (
<NavbarSidebarTrigger className="p-2 -me-1.5 md:hidden" />
)}
</Navbar>
))}
<LayoutBody