@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
20 lines (19 loc) • 835 B
JavaScript
"use client";
import { isElement } from "../../../core/utils/is-element/is-element.mjs";
import { Popover } from "../../Popover/Popover.mjs";
import { useMenuContext } from "../Menu.context.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Menu/MenuSubTarget/MenuSubTarget.tsx
function MenuSubTarget({ children, refProp }) {
if (!isElement(children)) throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");
useMenuContext();
return /* @__PURE__ */ jsx(Popover.Target, {
refProp,
popupType: "menu",
children
});
}
MenuSubTarget.displayName = "@mantine/core/MenuSubTarget";
//#endregion
export { MenuSubTarget };
//# sourceMappingURL=MenuSubTarget.mjs.map