@payfit/unity-components
Version:
35 lines (34 loc) • 1.05 kB
JavaScript
import { uyTv as e } from "@payfit/unity-themes";
import { jsx as t, jsxs as n } from "react/jsx-runtime";
import { MenuSection as r } from "react-aria-components/Menu";
import { Header as i } from "react-aria-components/Header";
import { Collection as a } from "react-aria-components/Collection";
//#region src/components/menu/parts/MenuSection.tsx
var o = e({
slots: {
base: [""],
header: ["uy:px-150 uy:py-100 uy:typography-body-strong uy:text-content-neutral-enabled"]
},
variants: { isTitleHidden: {
true: { header: "uy:sr-only" },
false: { header: "" }
} },
defaultVariants: { isTitleHidden: !1 }
});
function s({ children: e, items: s, className: c, title: l, isTitleHidden: u, ...d }) {
let { base: f, header: p } = o({ isTitleHidden: u });
return /* @__PURE__ */ n(r, {
...d,
className: f({ className: c }),
children: [/* @__PURE__ */ t(i, {
className: p(),
children: l
}), /* @__PURE__ */ t(a, {
items: s,
children: e
})]
});
}
s.displayName = "MenuSection";
//#endregion
export { s as MenuSection };