UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

19 lines (16 loc) 702 B
'use client'; import React from 'react'; function isGroup(input) { return "group" in input; } function NativeSelectOption({ data }) { if (isGroup(data)) { const items = data.items.map((item) => /* @__PURE__ */ React.createElement(NativeSelectOption, { key: item.value, data: item })); return /* @__PURE__ */ React.createElement("optgroup", { label: data.group }, items); } const { value, label, ...others } = data; return /* @__PURE__ */ React.createElement("option", { key: data.value, value: data.value, ...others }, data.label); } NativeSelectOption.displayName = "@mantine/core/NativeSelectOption"; export { NativeSelectOption }; //# sourceMappingURL=NativeSelectOption.mjs.map