UNPKG

@carbon/ibm-products

Version:
38 lines (36 loc) 1.35 kB
/** * Copyright IBM Corp. 2020, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { __toESM } from "../../_virtual/_rolldown/runtime.js"; import { require_classnames } from "../../node_modules/classnames/index.js"; import { blockClass } from "./Toolbar.js"; import React, { forwardRef } from "react"; import { node, string } from "prop-types"; //#region src/components/Toolbar/ToolbarGroup.tsx /** * Copyright IBM Corp. 2021, 2024 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ var import_classnames = /* @__PURE__ */ __toESM(require_classnames()); /** Toolbar groups organize the commands within a toolbar into related groups. */ const ToolbarGroup = forwardRef(({ className, children, ...rest }, ref) => { return /* @__PURE__ */ React.createElement("div", { ...rest, ref, className: (0, import_classnames.default)(`${blockClass}__group`, className) }, children); }); ToolbarGroup.displayName = "ToolbarGroup"; ToolbarGroup.propTypes = { /** Provide the content of the `ToolbarGroup` */ children: node.isRequired, /** Provide an optional class to be applied to the containing node */ className: string }; //#endregion export { ToolbarGroup };