UNPKG

@carbon/ibm-products

Version:

Carbon for IBM Products

38 lines (34 loc) 1.28 kB
/** * Copyright IBM Corp. 2020, 2025 * * 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 { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js'; import React__default, { forwardRef } from 'react'; import { p as propTypesExports } from '../../_virtual/index.js'; import { blockClass } from './Toolbar.js'; import cx from 'classnames'; import { pkg } from '../../settings.js'; /** Toolbar groups organize the commands within a toolbar into related groups. */ let ToolbarGroup = /*#__PURE__*/forwardRef((_ref, ref) => { let { className, children, ...rest } = _ref; return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, { ref: ref, className: cx(`${blockClass}__group`, className) }), children); }); const componentName = 'ToolbarGroup'; ToolbarGroup.displayName = componentName; ToolbarGroup.propTypes = { /** Provide the content of the `ToolbarGroup` */ children: propTypesExports.node.isRequired, /** Provide an optional class to be applied to the containing node */ className: propTypesExports.string }; ToolbarGroup = pkg.checkComponentEnabled(ToolbarGroup, componentName); export { ToolbarGroup };