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