UNPKG

@coreui/react

Version:

UI Components Library for React.js

41 lines (38 loc) 1.91 kB
import { __rest, __assign } 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'; var CWidgetStatsA = forwardRef(function (_a, ref) { var _b; var action = _a.action, chart = _a.chart, className = _a.className, color = _a.color, title = _a.title, value = _a.value, rest = __rest(_a, ["action", "chart", "className", "color", "title", "value"]); return (React.createElement(CCard, __assign({ className: classNames((_b = {}, _b["bg-".concat(color)] = color, _b['text-white'] = color, _b), 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