@carbon/ibm-security
Version:
Carbon for Cloud & Cognitive IBM Security UI components
35 lines (34 loc) • 1.29 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "className"];
/**
* @file Summary card body.
* @copyright IBM Security 2019
*/
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import ScrollGradient from '../../ScrollGradient';
import { getComponentNamespace } from '../../../globals/namespace/index';
import theme from '../../../globals/theme';
var namespace = getComponentNamespace('summary-card__body');
var SummaryCardBody = function SummaryCardBody(_ref) {
var children = _ref.children,
className = _ref.className,
other = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/React.createElement("div", _extends({
className: classnames(namespace, className)
}, other), /*#__PURE__*/React.createElement(ScrollGradient, {
color: theme.uiBackground
}, children));
};
SummaryCardBody.propTypes = {
/** @type {node} The children rendered in body area of the card. */
children: PropTypes.node.isRequired,
/** @type {string} Extra class names to add.. */
className: PropTypes.string
};
SummaryCardBody.defaultProps = {
className: null
};
export default SummaryCardBody;