UNPKG

@payfit/unity-components

Version:

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