@carbon/ibm-security
Version:
Carbon for Cloud & Cognitive IBM Security UI components
32 lines (30 loc) • 1.1 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children"];
/**
* @file Button cluster module.
* @copyright IBM Security 2020
*/
import { node } from 'prop-types';
import React, { Children } from 'react';
import LayoutModule from '../LayoutModule';
var namespace = 'button-cluster';
/**
* The button cluster module group secondary actions that can be taken on a whole page or component.
*/
var ButtonClusterModule = function ButtonClusterModule(_ref) {
var children = _ref.children,
other = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/React.createElement(LayoutModule, _extends({
namespace: namespace
}, other), Children.map(children, function (child) {
return /*#__PURE__*/React.createElement(LayoutModule, {
namespace: "".concat(namespace, "__button")
}, child);
}));
};
ButtonClusterModule.propTypes = {
/** Provide the `Button`s for the `ButtonClusterModule` */
children: node.isRequired
};
export default ButtonClusterModule;