UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

24 lines (23 loc) 1.18 kB
"use client"; import { isElement } from "../../../core/utils/is-element/is-element.mjs"; import { useProps } from "../../../core/MantineProvider/use-props/use-props.mjs"; import { factory } from "../../../core/factory/factory.mjs"; import { Popover } from "../../Popover/Popover.mjs"; import { useComboboxContext } from "../Combobox.context.mjs"; import { jsx } from "react/jsx-runtime"; //#region packages/@mantine/core/src/components/Combobox/ComboboxDropdownTarget/ComboboxDropdownTarget.tsx const defaultProps = { refProp: "ref" }; const ComboboxDropdownTarget = factory((props) => { const { children, refProp, ref } = useProps("ComboboxDropdownTarget", defaultProps, props); useComboboxContext(); if (!isElement(children)) throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"); return /* @__PURE__ */ jsx(Popover.Target, { ref, refProp, children }); }); ComboboxDropdownTarget.displayName = "@mantine/core/ComboboxDropdownTarget"; //#endregion export { ComboboxDropdownTarget }; //# sourceMappingURL=ComboboxDropdownTarget.mjs.map