@payfit/unity-components
Version:
33 lines (32 loc) • 920 B
JavaScript
import { Button as e } from "../../button/Button.js";
import { forwardRef as t, useCallback as n } from "react";
import { useUnityTheme as r } from "@payfit/unity-themes";
import { jsx as i } from "react/jsx-runtime";
//#region src/components/funnel-layout/parts/FunnelPageAction.tsx
var a = t(({ actionType: t, children: a, ...o }, s) => {
let { theme: c } = r();
return /* @__PURE__ */ i(e, {
ref: s,
"data-dd-privacy": "allow",
...n((e) => {
switch (e) {
case "previous": return { variant: c === "rebrand" ? "outlined" : "secondary" };
case "next": return {
variant: "primary",
color: "primary"
};
case "optional": return {
variant: "ghost",
color: "neutral"
};
}
}, [c])(t),
...o,
"data-unity-component": "FunnelPageAction",
"data-action-type": t,
children: a
});
});
a.displayName = "FunnelPageAction";
//#endregion
export { a as FunnelPageAction };