@payfit/unity-components
Version:
30 lines (29 loc) • 728 B
JavaScript
import { IconButton as e } from "../../icon-button/IconButton.js";
import { forwardRef as t } from "react";
import { jsx as n } from "react/jsx-runtime";
//#region src/components/action-bar/parts/ActionBarIconButton.tsx
var r = t(({ icon: t, label: r, variant: i = "secondary", onPress: a, isDisabled: o = !1, isLoading: s = !1 }, c) => {
let l = {
primary: {
variant: "primary",
color: "inverted"
},
secondary: {
variant: "ghost",
color: "inverted"
}
}[i];
return /* @__PURE__ */ n(e, {
ref: c,
icon: t,
label: r,
variant: l.variant,
color: l.color,
onPress: a,
isDisabled: o,
isLoading: s
});
});
r.displayName = "ActionBarIconButton";
//#endregion
export { r as ActionBarIconButton };