MCPcopy
hub / github.com/TheOrcDev/8bitcn-ui / useSidebar

Function useSidebar

components/ui/sidebar.tsx:50–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 7

NavDocumentsFunction · 0.90
DashboardHeaderFunction · 0.90
NavUserFunction · 0.90
SidebarFunction · 0.85
SidebarTriggerFunction · 0.85
SidebarRailFunction · 0.85
SidebarMenuButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected