UNPKG

@coreui/react

Version:

UI Components Library for React.js

27 lines (24 loc) 1.1 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 { colorPropType } from '../../props.js'; var CCard = forwardRef(function (_a, ref) { var _b; var children = _a.children, className = _a.className, color = _a.color, textBgColor = _a.textBgColor, textColor = _a.textColor, rest = __rest(_a, ["children", "className", "color", "textBgColor", "textColor"]); return (React.createElement("div", __assign({ className: classNames('card', (_b = {}, _b["bg-".concat(color)] = color, _b["text-".concat(textColor)] = textColor, _b["text-bg-".concat(textBgColor)] = textBgColor, _b), className) }, rest, { ref: ref }), children)); }); CCard.propTypes = { children: PropTypes.node, className: PropTypes.string, color: colorPropType, textBgColor: colorPropType, textColor: PropTypes.string, }; CCard.displayName = 'CCard'; export { CCard }; //# sourceMappingURL=CCard.js.map