@coreui/react
Version:
UI Components Library for React.js
40 lines (37 loc) • 2.01 kB
JavaScript
import { __rest, __assign } from '../../node_modules/tslib/tslib.es6.js';
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import { CCard } from '../card/CCard.js';
import { CCardBody } from '../card/CCardBody.js';
import '../card/CCardFooter.js';
import '../card/CCardGroup.js';
import '../card/CCardHeader.js';
import '../card/CCardImage.js';
import '../card/CCardImageOverlay.js';
import '../card/CCardLink.js';
import '../card/CCardSubtitle.js';
import '../card/CCardText.js';
import '../card/CCardTitle.js';
import { CProgress } from '../progress/CProgress.js';
import { colorPropType } from '../../props.js';
var CWidgetStatsB = forwardRef(function (_a, ref) {
var className = _a.className, color = _a.color, inverse = _a.inverse, progress = _a.progress, text = _a.text, title = _a.title, value = _a.value, rest = __rest(_a, ["className", "color", "inverse", "progress", "text", "title", "value"]);
return (React.createElement(CCard, __assign({ className: className, color: color }, (inverse && { textColor: 'white' }), rest, { ref: ref }),
React.createElement(CCardBody, null,
value && React.createElement("div", { className: "fs-4 fw-semibold" }, value),
title && React.createElement("div", null, title),
React.createElement(CProgress, __assign({ className: "my-2", height: 4 }, (inverse && { white: true }), progress)),
text && (React.createElement("small", { className: inverse ? 'text-white text-opacity-75' : 'text-body-secondary' }, text)))));
});
CWidgetStatsB.propTypes = {
className: PropTypes.string,
color: colorPropType,
inverse: PropTypes.bool,
progress: PropTypes.object,
text: PropTypes.string,
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
};
CWidgetStatsB.displayName = 'CWidgetCWidgetStatsB';
export { CWidgetStatsB };
//# sourceMappingURL=CWidgetStatsB.js.map