@coreui/react
Version:
UI Components Library for React.js
42 lines (38 loc) • 2.09 kB
JavaScript
'use strict';
var tslib_es6 = require('../../node_modules/tslib/tslib.es6.js');
var React = require('react');
var PropTypes = require('prop-types');
var CCard = require('../card/CCard.js');
var CCardBody = require('../card/CCardBody.js');
require('../card/CCardFooter.js');
require('../card/CCardGroup.js');
require('../card/CCardHeader.js');
require('../card/CCardImage.js');
require('../card/CCardImageOverlay.js');
require('../card/CCardLink.js');
require('../card/CCardSubtitle.js');
require('../card/CCardText.js');
require('../card/CCardTitle.js');
var CProgress = require('../progress/CProgress.js');
var props = require('../../props.js');
var CWidgetStatsB = React.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 = tslib_es6.__rest(_a, ["className", "color", "inverse", "progress", "text", "title", "value"]);
return (React.createElement(CCard.CCard, tslib_es6.__assign({ className: className, color: color }, (inverse && { textColor: 'white' }), rest, { ref: ref }),
React.createElement(CCardBody.CCardBody, null,
value && React.createElement("div", { className: "fs-4 fw-semibold" }, value),
title && React.createElement("div", null, title),
React.createElement(CProgress.CProgress, tslib_es6.__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: props.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';
exports.CWidgetStatsB = CWidgetStatsB;
//# sourceMappingURL=CWidgetStatsB.js.map