@payfit/unity-components
Version:
23 lines (22 loc) • 692 B
JavaScript
import { menuPopover as e } from "../menu.variants.js";
import t from "react";
import { jsx as n, jsxs as r } from "react/jsx-runtime";
import { Popover as i, SubmenuTrigger as a } from "react-aria-components/Menu";
//#region src/core/components/menu/parts/MenuSubmenu.tsx
function o({ children: o, ...s }) {
let [c, l] = t.Children.toArray(o);
if (!c || !l) throw Error("MenuSubmenu must have a trigger and a menu content");
return /* @__PURE__ */ r(a, {
...s,
children: [c, /* @__PURE__ */ n(i, {
offset: -8,
crossOffset: -8,
className: e(),
"data-dd-privacy": "allow",
children: l
})]
});
}
o.displayName = "MenuSubmenu";
//#endregion
export { o as MenuSubmenu };