UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

26 lines (25 loc) 1.13 kB
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 };