@adyen/adyen-platform-experience-web
Version:

26 lines (25 loc) • 1.13 kB
JavaScript
import { jsx as n } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import c from "./hooks/useButton.js";
import { DEFAULT_BUTTON_CLASSNAME as f } from "./constants.js";
import { useMemo as a } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js";
import { ButtonVariant as u } from "./types.js";
/* empty css */
import { fixedForwardRef as d } from "../../../utils/preact/fixedForwardRef.js";
import { parseClassName as N } from "../../../utils/preact/className.js";
import { parseBooleanProp as B } from "../../../utils/preact/props.js";
function b(t, o) {
const e = a(() => N("", t.className) || "", [t.className]), i = a(() => B(t.disabled || !1), [t.disabled]), { click: l, allChildren: r, allProps: s } = c(
e,
[...t.classNameModifiers || [], t.variant || u.PRIMARY],
f,
i,
t,
t.type,
t.onClick
), { classNameModifiers: A, ...m } = s;
return /* @__PURE__ */ n("button", { ...m, ref: o, type: t.type || "button", onClick: l, children: r });
}
const h = d(b);
export {
h as default
};