UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

42 lines (38 loc) 1.04 kB
"use client"; import { Group } from "../group/group.js"; import { ButtonPropsContext } from "./button.js"; import { IconButtonPropsContext } from "./icon-button.js"; import { useMemo } from "react"; import { jsx } from "react/jsx-runtime"; //#region src/components/button/button-group.tsx /** * `Button` is an interactive component that allows users to perform actions such as submitting forms and toggling modals. * * @see https://yamada-ui.com/docs/components/button */ const ButtonGroupRoot = (({ size, variant, attached, disabled,...rest }) => { const context = useMemo(() => ({ size, variant, disabled, focusVisibleRing: attached ? "inside" : void 0 }), [ size, variant, disabled, attached ]); return /* @__PURE__ */ jsx(ButtonPropsContext, { value: context, children: /* @__PURE__ */ jsx(IconButtonPropsContext, { value: context, children: /* @__PURE__ */ jsx(Group, { attached, ...rest }) }) }); }); //#endregion export { ButtonGroupRoot }; //# sourceMappingURL=button-group.js.map