UNPKG

@coreui/react

Version:

UI Components Library for React.js

22 lines (18 loc) 958 B
'use strict'; var tslib_es6 = require('../../node_modules/tslib/tslib.es6.js'); var React = require('react'); var PropTypes = require('prop-types'); var index = require('../../_virtual/index.js'); var CCardImage = React.forwardRef(function (_a, ref) { var children = _a.children, _b = _a.as, Component = _b === void 0 ? 'img' : _b, className = _a.className, orientation = _a.orientation, rest = tslib_es6.__rest(_a, ["children", "as", "className", "orientation"]); return (React.createElement(Component, tslib_es6.__assign({ className: index.default(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'; exports.CCardImage = CCardImage; //# sourceMappingURL=CCardImage.js.map