UNPKG

@lanaco/lnc-react-ui

Version:

React component library

16 lines (15 loc) 470 B
import { jsx as s } from "react/jsx-runtime"; import { forwardRef as p, useContext as f } from "react"; import c from "./PopoverContext.js"; const i = () => { const o = f(c); if (o == null) throw new Error("Popover components must be wrapped in <Popover />"); return o; }, l = p(function({ children: e, ...t }, r) { const n = i(); return /* @__PURE__ */ s("div", { ...t, ref: r, onClick: () => n.setOpen(!1), children: e }); }); export { l as default };