@payfit/unity-components
Version:
26 lines (25 loc) • 800 B
JavaScript
import { useBreakpointListener as e } from "../../../hooks/use-breakpoint-listener.js";
import { Button as t } from "../../button/Button.js";
import { IconButton as n } from "../../icon-button/IconButton.js";
import { jsx as r } from "react/jsx-runtime";
//#region src/components/funnel-layout/parts/FunnelBackButton.tsx
var i = ({ label: i, onPress: a, truncateLabelLength: o }) => {
let s = e();
return ["xs", "sm"].includes(s) ? /* @__PURE__ */ r(n, {
variant: "ghost",
color: "neutral",
icon: "ArrowLeftOutlined",
label: i,
onClick: a
}) : /* @__PURE__ */ r(t, {
variant: "ghost",
color: "neutral",
prefixIcon: "ArrowLeftOutlined",
onPress: a,
truncateLabelLength: o,
children: i
});
};
i.displayName = "FunnelBackButton";
//#endregion
export { i as FunnelBackButton };