diff --git a/src/design-system/layout/Sidebar/SidebarContext.ts b/src/design-system/layout/Sidebar/SidebarContext.ts new file mode 100644 index 0000000..ad09432 --- /dev/null +++ b/src/design-system/layout/Sidebar/SidebarContext.ts @@ -0,0 +1,14 @@ +import { createContext, useContext } from 'react' + +export interface SidebarContextValue { + collapsed: boolean + onCollapseToggle?: () => void +} + +export const SidebarContext = createContext({ + collapsed: false, +}) + +export function useSidebarContext(): SidebarContextValue { + return useContext(SidebarContext) +}