@payfit/unity-components
Version:
23 lines (22 loc) • 783 B
JavaScript
import { SegmentedButtonGroupProvider as e } from "./SegmentedButtonGroups.context.js";
import { jsx as t } from "react/jsx-runtime";
import { useRadioGroup as n } from "react-aria/useRadioGroup";
import { useRadioGroupState as r } from "react-stately/useRadioGroupState";
//#region src/components/segmented-button-group/SegmentedButtonGroup.tsx
var i = (i) => {
let { children: a } = i, o = r(i), { radioGroupProps: s } = n({
...i,
orientation: "horizontal"
}, o);
return /* @__PURE__ */ t("div", {
...s,
className: "uy:bg-surface-neutral-low uy:py-50 uy:px-50 uy:flex uy:gap-50 uy:rounded-75 uy:w-fit",
children: /* @__PURE__ */ t(e, {
state: o,
children: a
})
});
};
i.displayName = "SegmentedButtonGroup";
//#endregion
export { i as SegmentedButtonGroup };