@payfit/unity-components
Version:
40 lines (39 loc) • 1.36 kB
JavaScript
import { IconButton as e } from "../../icon-button/IconButton.js";
import { Menu as t } from "../../menu/Menu.js";
import { MenuContent as n } from "../../menu/parts/MenuContent.js";
import { MenuTrigger as r } from "../../menu/parts/MenuTrigger.js";
import { RawMenuItem as i } from "../../menu/parts/RawMenuItem.js";
import { jsx as a, jsxs as o } from "react/jsx-runtime";
import { useTranslation as s } from "react-i18next";
import { Icon as c } from "@payfit/unity-icons";
//#region src/core/components/action-bar/parts/ActionBarOverflowMenu.tsx
var l = ({ actions: l }) => {
let { t: u } = s("unity");
return /* @__PURE__ */ a("div", {
className: "uy:block uy:md:hidden",
children: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(r, {
asChild: !0,
children: /* @__PURE__ */ a(e, {
icon: "DotsThreeOutlined",
label: u((e) => e.unity.component.actionBar.actions.moreActions),
variant: "ghost",
color: "inverted"
})
}), /* @__PURE__ */ a(n, { children: l.map((e) => {
let t = e.meta;
return /* @__PURE__ */ a(i, {
isDisabled: t?.isDisabled,
onAction: () => {
t?.onPress?.({});
},
prefix: t?.prefixIcon ? /* @__PURE__ */ a(c, {
src: t.prefixIcon,
size: 20
}) : void 0,
children: e.label
}, e.id);
}) })] })
});
};
//#endregion
export { l as ActionBarOverflowMenu };