UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

13 lines (12 loc) • 468 B
"use client"; import { createContext, use } from "react"; //#region src/base-ui/DraggablePanel/context.ts const DraggablePanelContext = createContext(null); const useDraggablePanelContext = () => { const context = use(DraggablePanelContext); if (!context) throw new Error("DraggablePanel atoms must be used inside DraggablePanelRoot"); return context; }; //#endregion export { DraggablePanelContext, useDraggablePanelContext }; //# sourceMappingURL=context.mjs.map