synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
75 lines (74 loc) • 2.19 kB
JavaScript
import { jsxs as d, jsx as e } from "react/jsx-runtime";
import { useTheme as x, useMediaQuery as a, Box as o, Button as c, Typography as h } from "@mui/material";
import { DropdownMenu as f } from "./DropdownMenu.js";
import { IconSvgButton as g } from "../IconSvgButton.js";
import w from "../IconSvg/IconSvg.js";
function b(i) {
const { iconButtons: n = [], dropdownMenus: r = [] } = i, p = x(), s = a(p.breakpoints.down("sm"));
return /* @__PURE__ */ d(
o,
{
sx: (t) => ({
display: "flex",
alignItems: "center",
gap: "10px",
[t.breakpoints.down("sm")]: {
flexDirection: "column",
paddingTop: "10px"
}
}),
children: [
n.map(
(t) => s && t.tooltipText ? /* @__PURE__ */ e(
o,
{
sx: {
width: "100%",
textAlign: "center"
},
children: /* @__PURE__ */ e(
c,
{
variant: "text",
startIcon: /* @__PURE__ */ e(
w,
{
icon: t.icon,
wrap: !1,
fontSize: "inherit"
},
t.tooltipText
),
onClick: t.onClick,
sx: {
padding: "6px 12px",
minWidth: "unset"
},
children: /* @__PURE__ */ e(h, { variant: "buttonLink", children: t.tooltipText })
}
)
}
) : /* @__PURE__ */ e(g, { ...t }, t.tooltipText)
),
r.map(
(t, l) => t.items && t.items.length > 0 && /* @__PURE__ */ e(
o,
{
sx: (m) => ({
[m.breakpoints.down("sm")]: {
width: "100%",
".MuiButton-root": { width: "100%" }
}
}),
children: /* @__PURE__ */ e(f, { ...t }, l)
}
)
)
]
}
);
}
export {
b as ComplexMenu
};
//# sourceMappingURL=ComplexMenu.js.map