@clubmed/trident-ui
Version:
Shared ClubMed React UI components
48 lines (47 loc) • 1.15 kB
JavaScript
import { jsx as n } from "react/jsx-runtime";
import { c as C } from "../../chunks/index.js";
import "react";
/* empty css */
import { variants as N, rootClassName as b } from "./Button.helpers.js";
import { themes as d } from "./Button.themes.js";
import { ButtonContent as j } from "./ButtonContent.js";
const A = ({
type: r = "button",
theme: s = "yellow",
backgroundOverride: a,
variant: t = "text",
className: p,
label: o,
children: c,
title: m,
icon: i,
iconType: l,
tabIndex: u = 0,
disabled: e = !1,
dataTestId: f,
groupName: x = "",
...h
}) => {
const B = t === "text" || t === "textSmall", w = N[t], y = d(s, a, x);
return /* @__PURE__ */ n(
"button",
{
...h,
"data-name": "Button",
"data-testid": f,
type: r,
className: C(b, y, w, t, p, {
"pointer-events-none": e
}),
disabled: e,
tabIndex: e ? -1 : u,
title: m || o,
"aria-label": m || o,
children: /* @__PURE__ */ n(j, { showLabel: B, label: o, icon: i, iconType: l, children: c })
}
);
};
export {
A as Button
};
//# sourceMappingURL=Button.js.map