UNPKG

@coreui/react

Version:

UI Components Library for React.js

26 lines (23 loc) 977 B
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 { colorPropType } from '../../props.js'; const CCard = forwardRef((_a, ref) => { var { children, className, color, textBgColor, textColor } = _a, rest = __rest(_a, ["children", "className", "color", "textBgColor", "textColor"]); return (React.createElement("div", Object.assign({ className: classNames('card', { [`bg-${color}`]: color, [`text-${textColor}`]: textColor, [`text-bg-${textBgColor}`]: textBgColor, }, 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