@coreui/react-pro
Version:
UI Components Library for React.js
40 lines (37 loc) • 1.8 kB
JavaScript
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import classNames from '../../_virtual/index.js';
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 { colorPropType } from '../../props.js';
const CWidgetStatsA = forwardRef((_a, ref) => {
var { action, chart, className, color, title, value } = _a, rest = __rest(_a, ["action", "chart", "className", "color", "title", "value"]);
return (React.createElement(CCard, Object.assign({ className: classNames({ [`bg-${color}`]: color, 'text-white': color }, className) }, rest, { ref: ref }),
React.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
React.createElement("div", null,
value && React.createElement("div", { className: "fs-4 fw-semibold" }, value),
title && React.createElement("div", null, title)),
action),
chart));
});
CWidgetStatsA.propTypes = {
action: PropTypes.node,
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
className: PropTypes.string,
color: colorPropType,
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
};
CWidgetStatsA.displayName = 'CWidgetStatsA';
export { CWidgetStatsA };
//# sourceMappingURL=CWidgetStatsA.js.map