MCPcopy
hub / github.com/vudovn/ag-kit / useSidebar

Function useSidebar

web/src/components/ui/sidebar.tsx:48–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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