Hide button on mobile to open toc if disabled at the page level (#2471)

This commit is contained in:
Samy Pessé
2024-09-18 19:49:02 +02:00
committed by GitHub
parent bfbed1a69b
commit 2ff7ed1b52
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix table of contents being visible on mobile when disabled at the page level
@@ -63,6 +63,7 @@ export function HeaderMobileMenu(props: Partial<React.ButtonHTMLAttributes<HTMLB
'dark:hover:bg-light/2',
'rounded',
'straight-corners:rounded-sm',
'page-no-toc:hidden',
props.className,
)}
>
@@ -51,7 +51,7 @@ export function TableOfContents(props: {
'dark:navigation-open:shadow-light/2',
withHeaderOffset ? 'lg:h-[calc(100vh_-_4rem)]' : 'lg:h-[100vh]',
withHeaderOffset ? 'lg:top-16' : 'lg:top-0',
'page-no-toc:lg:hidden',
'page-no-toc:hidden',
)}
>
{header ? header : null}