@frontify/fondue
Version:
Design system of Frontify
19 lines (18 loc) • 701 B
JavaScript
import { jsx as a } from "react/jsx-runtime";
import { Children as i, isValidElement as m, cloneElement as l } from "react";
import { merge as p } from "../../utilities/merge.es.js";
import { ButtonSize as t } from "../Button/ButtonTypes.es.js";
const u = {
[t.Small]: "tw-gap-x-1",
[t.Medium]: "tw-gap-x-2",
[t.Large]: "tw-gap-x-3"
}, d = ({
children: o,
size: e,
"data-test-id": n = "button-group"
}) => /* @__PURE__ */ a("div", { "data-test-id": n, className: p(["tw-display tw-inline-flex tw-flex-row", u[e]]), children: i.map(o, (r) => m(r) ? l(r, { size: e }) : null) });
d.displayName = "FondueButtonGroup";
export {
d as ButtonGroup
};
//# sourceMappingURL=ButtonGroup.es.js.map