UNPKG

@carbon/ibm-security

Version:

Carbon for Cloud & Cognitive IBM Security UI components

31 lines (30 loc) 1.09 kB
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; var _excluded = ["children", "className"]; /** * @file Summary card. * @copyright IBM Security 2019 */ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { getComponentNamespace } from '../../globals/namespace'; export var namespace = getComponentNamespace('summary-card'); var SummaryCard = function SummaryCard(_ref) { var children = _ref.children, className = _ref.className, other = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement("section", _extends({ className: classnames(namespace, className) }, other), children); }; SummaryCard.defaultProps = { className: '' }; SummaryCard.propTypes = { /** @type {node} The children are rendered in the main content area of the card. */ children: PropTypes.node.isRequired, /** @type {string} Extra classes to add. */ className: PropTypes.string }; export default SummaryCard;