@payfit/unity-components
Version:
35 lines (34 loc) • 1.2 kB
JavaScript
import "react";
import { uyTv as e } from "@payfit/unity-themes";
import { jsx as t, jsxs as n } from "react/jsx-runtime";
import { Header as r } from "react-aria-components/Header";
import { Separator as i } from "react-aria-components/Separator";
import { ListBoxSection as a } from "react-aria-components/ListBox";
import { Collection as o } from "react-aria-components/Collection";
//#region src/components/select-list/parts/SelectListOptGroup.tsx
var s = e({ slots: {
base: "uy:flex uy:flex-col uy:bg-surface-neutral",
label: "uy:px-150 uy:py-100 uy:typography-body-strong uy:text-content-neutral",
separator: "uy:my-100 uy:border-t uy:border-border-neutral uy:border-solid"
} });
function c(e) {
let { base: c, label: l, separator: u } = s(), { label: d, withSeparator: f = !1, children: p, ...m } = e;
return /* @__PURE__ */ n(a, {
...m,
className: c(),
children: [
d && /* @__PURE__ */ t(r, {
className: l(),
children: d
}),
typeof p == "function" ? /* @__PURE__ */ t(o, {
items: e.items,
children: p
}) : p,
f && /* @__PURE__ */ t(i, { className: u() })
]
});
}
c.displayName = "SelectListOptGroup";
//#endregion
export { c as SelectListOptGroup };