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)

25 lines (24 loc) 1.05 kB
import { jsx as n } from "../../../external/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 o } from "../../../external/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, a) { const e = o(() => N("", t.className) || "", [t.className]), r = o(() => B(t.disabled || !1), [t.disabled]), { click: s, allChildren: i, allProps: l } = c( e, [...t.classNameModifiers || [], t.variant || u.PRIMARY], f, r, t, t.onClick ), { classNameModifiers: A, ...m } = l; return /* @__PURE__ */ n("button", { ...m, ref: a, type: t.type || "button", onClick: s, children: i }); } const y = d(b); export { y as default };