MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / useSidebar

Function useSidebar

src/components/ui/sidebar.tsx:47–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45const SidebarContext = React.createContext<SidebarContextProps | null>(null)
46
47function useSidebar() {
48 const context = React.useContext(SidebarContext)
49 if (!context) {
50 throw new Error("useSidebar must be used within a SidebarProvider.")
51 }
52
53 return context
54}
55
56function SidebarProvider({
57 defaultOpen = true,

Callers 4

SidebarFunction · 0.85
SidebarTriggerFunction · 0.85
SidebarRailFunction · 0.85
SidebarMenuButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected