synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
30 lines (29 loc) • 936 B
JavaScript
import { jsx as o, Fragment as c } from "react/jsx-runtime";
import { Tooltip as g, IconButton as a } from "@mui/material";
import x from "./IconSvg/IconSvg.js";
function B(p) {
const {
icon: s,
tooltipText: t,
onClick: n,
disabled: m,
href: e,
color: d,
size: h,
sx: f,
tooltipPlacement: u = "top",
"aria-label": b
} = p, r = /* @__PURE__ */ o(x, { icon: s, wrap: !1, fontSize: "inherit" }), i = {
role: "button",
color: d,
disabled: m,
sx: f,
size: h,
"aria-label": b ?? t
}, l = /* @__PURE__ */ o(c, { children: e ? /* @__PURE__ */ o(a, { ...i, href: e, children: r }) : n ? /* @__PURE__ */ o(a, { ...i, onClick: n, children: r }) : /* @__PURE__ */ o(c, {}) });
return t ? /* @__PURE__ */ o(g, { title: t, placement: u, children: /* @__PURE__ */ o("span", { children: l }) }, t) : l;
}
export {
B as IconSvgButton
};
//# sourceMappingURL=IconSvgButton.js.map