UNPKG

@lanaco/lnc-react-ui

Version:

React component library

17 lines (16 loc) 602 B
import { jsx as s } from "react/jsx-runtime"; import { u as i } from "./floating-ui.react.esm-umB-tMXa.js"; import { forwardRef as u, useLayoutEffect as c, useContext as f } from "react"; import m from "./PopoverContext.js"; const a = () => { const o = f(m); if (o == null) throw new Error("Popover components must be wrapped in <Popover />"); return o; }, w = u(function({ children: e, ...n }, p) { const { setDescriptionId: t } = a(), r = i(); return c(() => (t(r), () => t(void 0)), [r, t]), /* @__PURE__ */ s("p", { ...n, ref: p, id: r, children: e }); }); export { w as default };