UNPKG

@carbon/ibm-security

Version:

Carbon for Cloud & Cognitive IBM Security UI components

56 lines (55 loc) 1.83 kB
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; var _excluded = ["className"]; /** * @file Summary card skeleton. * @copyright IBM Security 2019 - 2020 */ import classnames from 'classnames'; import { string } from 'prop-types'; import React from 'react'; import { getComponentNamespace } from '../../../globals/namespace/index'; import SkeletonText from '../../SkeletonText'; import Card from '..'; var namespace = getComponentNamespace('summary-card--skeleton'); var WIDTHS = { sm: '25%', md: '50%', lg: '75%' }; var sm = WIDTHS.sm, md = WIDTHS.md, lg = WIDTHS.lg; var SummaryCardSkeleton = function SummaryCardSkeleton(_ref) { var className = _ref.className, other = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement(Card, _extends({ className: classnames(namespace, className) }, other), /*#__PURE__*/React.createElement(SkeletonText, { width: sm }), /*#__PURE__*/React.createElement(SkeletonText, { width: sm, heading: true }), /*#__PURE__*/React.createElement(SkeletonText, { width: md }), /*#__PURE__*/React.createElement(SkeletonText, { width: md }), /*#__PURE__*/React.createElement(SkeletonText, { width: lg }), /*#__PURE__*/React.createElement("div", { className: "".concat(namespace, "__wrapper") }, /*#__PURE__*/React.createElement(SkeletonText, { className: "".concat(namespace, "__text--inline"), width: sm }), /*#__PURE__*/React.createElement(SkeletonText, { width: sm }))); }; SummaryCardSkeleton.propTypes = { /** Provide an optional class to be applied to the containing node */ className: string }; SummaryCardSkeleton.defaultProps = { className: null }; export default SummaryCardSkeleton;