@coreui/react
Version:
UI Components Library for React.js
20 lines (17 loc) • 924 B
JavaScript
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';
var CCardImage = forwardRef(function (_a, ref) {
var children = _a.children, _b = _a.as, Component = _b === void 0 ? 'img' : _b, className = _a.className, orientation = _a.orientation, rest = __rest(_a, ["children", "as", "className", "orientation"]);
return (React.createElement(Component, __assign({ className: classNames(orientation ? "card-img-".concat(orientation) : 'card-img', className) }, rest, { ref: ref }), children));
});
CCardImage.propTypes = {
as: PropTypes.elementType,
children: PropTypes.node,
className: PropTypes.string,
orientation: PropTypes.oneOf(['top', 'bottom']),
};
CCardImage.displayName = 'CCardImage';
export { CCardImage };
//# sourceMappingURL=CCardImage.js.map