docs: fix irregular scrolling in code tabs (#5239)

* docs: fix blocking scroll util

* remove unnecessary util methods
This commit is contained in:
Shahed Nasser
2023-09-27 19:17:04 +03:00
committed by GitHub
parent 4e3f3b54cb
commit 11b2f1237b
4 changed files with 22 additions and 78 deletions
+4 -1
View File
@@ -35,7 +35,10 @@ export default function RootLayout({
>
<Providers>
<Navbar />
<div className="w-full h-[calc(100%-57px)] overflow-y-scroll">
<div
className="w-full h-[calc(100%-57px)] overflow-y-scroll"
id="main"
>
<div className="max-w-xxl grid w-full grid-cols-1 px-6 lg:mx-auto lg:grid-cols-[280px_1fr]">
<Sidebar expandItems={true} />
<div className="relative flex w-full flex-1 items-start justify-center px-4 pb-8 pt-16 md:px-8 lg:px-16 lg:py-[112px]">
+1 -1
View File
@@ -24,7 +24,7 @@ const Providers = ({ children }: ProvidersProps) => {
<SidebarProvider>
<NavbarProvider basePath={process.env.NEXT_PUBLIC_BASE_PATH}>
<SearchProvider>
<ScrollControllerProvider>
<ScrollControllerProvider scrollableSelector="#main">
{children}
</ScrollControllerProvider>
</SearchProvider>