UNPKG

@crossed/ui

Version:

A universal & performant styling library for React Native, Next.js & React

12 lines (11 loc) 586 B
import { jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; import { ProviderGroup, ButtonGroupCollection } from "./context"; import { XBox } from "../../layout/XBox"; const ButtonGroup = forwardRef( (props, ref) => /* @__PURE__ */ jsx(ProviderGroup, { grouped: true, orientation: props.orientation ?? "horizontal", children: /* @__PURE__ */ jsx(ButtonGroupCollection.Provider, { children: /* @__PURE__ */ jsx(ButtonGroupCollection.Slot, { children: /* @__PURE__ */ jsx(XBox, { ...props, ref }) }) }) }) ); export { ButtonGroup }; //# sourceMappingURL=Group.js.map