@@ -4,7 +4,7 @@ import { createContext, forwardRef, useRef } from 'react'
4
4
import { useIsomorphicLayoutEffect } from '@/hooks/useIsomorphicLayoutEffect'
5
5
import clsx from 'clsx'
6
6
import { SearchButton } from '@/components/Search'
7
- import { Dialog } from '@headlessui/react'
7
+ import { Dialog , DialogPanel } from '@headlessui/react'
8
8
9
9
export const SidebarContext = createContext ( )
10
10
@@ -28,7 +28,7 @@ const NavItem = forwardRef(({ href, children, isActive, isPublished, fallbackHre
28
28
} )
29
29
30
30
/**
31
- * Find the nearst scrollable ancestor (or self if scrollable)
31
+ * Find the nearest scrollable ancestor (or self if scrollable)
32
32
*
33
33
* Code adapted and simplified from the smoothscroll polyfill
34
34
*
@@ -534,8 +534,8 @@ export function SidebarLayout({
534
534
onClose = { ( ) => setNavIsOpen ( false ) }
535
535
className = "fixed z-50 inset-0 overflow-y-auto lg:hidden"
536
536
>
537
- < Dialog . Overlay className = "fixed inset-0 bg-black/20 backdrop-blur-sm dark:bg-slate-900/80" />
538
- < div className = "relative bg-white w-80 max-w-[calc(100%-3rem)] p-6 dark:bg-slate-800" >
537
+ < div className = "fixed inset-0 bg-black/20 backdrop-blur-sm dark:bg-slate-900/80" />
538
+ < DialogPanel className = "relative bg-white w-80 max-w-[calc(100%-3rem)] p-6 dark:bg-slate-800" >
539
539
< button
540
540
type = "button"
541
541
onClick = { ( ) => setNavIsOpen ( false ) }
@@ -555,7 +555,7 @@ export function SidebarLayout({
555
555
< Nav nav = { nav } fallbackHref = { fallbackHref } mobile = { true } >
556
556
{ sidebar }
557
557
</ Nav >
558
- </ div >
558
+ </ DialogPanel >
559
559
</ Dialog >
560
560
</ SidebarContext . Provider >
561
561
)
0 commit comments