UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

27 lines (26 loc) 916 B
"use client"; require("../../_virtual/_rolldown/runtime.cjs"); let react_jsx_runtime = require("react/jsx-runtime"); //#region packages/@mantine/core/src/components/NativeSelect/NativeSelectOption.tsx function isGroup(input) { return "group" in input; } function NativeSelectOption({ data }) { if (isGroup(data)) { const items = data.items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NativeSelectOption, { data: item }, item.value)); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", { label: data.group, children: items }); } const { value, label, ...others } = data; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", { value: data.value, ...others, children: data.label }); } NativeSelectOption.displayName = "@mantine/core/NativeSelectOption"; //#endregion exports.NativeSelectOption = NativeSelectOption; //# sourceMappingURL=NativeSelectOption.cjs.map