@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 442 B
JavaScript
import{__rest as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import o,{useContext as t}from"react";const i=o.createContext(null),n=o=>{var{children:t}=o,n=r(o,["children"]);return e(i.Provider,{value:n,children:t})};function d(){const r=t(i);if(!r)throw new Error("useSidebarDropdown must be used within a SidebarDropdownProvider.");return r}export{i as SidebarDropdownContext,n as SidebarDropdownProvider,d as useSidebarDropdown};