docs: added show/hide sidebar button (#4150)

* docs: added show/hide sidebar button

* added check for browser

* fix build error

* solve build errors
This commit is contained in:
Shahed Nasser
2023-05-22 19:44:50 +03:00
committed by GitHub
parent 0476f52519
commit 87444488b5
29 changed files with 589 additions and 188 deletions
+13
View File
@@ -0,0 +1,13 @@
import { createContext } from "react"
type SidebarContextType = {
hiddenSidebar: boolean
setHiddenSidebar: (value: boolean) => void
hiddenSidebarContainer: boolean
setHiddenSidebarContainer: (value: boolean) => void
floatingSidebar: boolean
setFloatingSidebar: (value: boolean) => void
onCollapse: () => void
}
export const SidebarContext = createContext<SidebarContextType | null>(null)