@codex-storage/marketplace-ui-components
Version:
Marketplace UI components for Codex decentralized storage network.
40 lines (39 loc) • 869 B
JavaScript
import { jsxs as d, jsx as r } from "react/jsx-runtime";
import { attributes as p } from "../utils/attributes.js";
import '../../assets/Button.css';function f({
label: i,
className: o = "",
Icon: a,
IconAfter: s,
onMouseEnter: m,
onMouseLeave: b,
size: e = "medium",
fetching: t = !1,
disabled: u = !1,
variant: n = "primary",
onClick: l
}) {
return /* @__PURE__ */ d(
"button",
{
onClick: l,
onMouseEnter: m,
onMouseLeave: b,
className: `button ${o} button--${n} button--${e}`,
...p({
disabled: u || t,
"aria-disabled": u || t,
"aria-busy": t
}),
children: [
a && /* @__PURE__ */ r(a, {}),
/* @__PURE__ */ r("span", { children: i }),
s && /* @__PURE__ */ r(s, {})
]
}
);
}
export {
f as Button
};
//# sourceMappingURL=Button.js.map