UNPKG

@coreui/react-pro

Version:

UI Components Library for React.js

22 lines (18 loc) 877 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'); const CCardImage = React.forwardRef((_a, ref) => { var { children, as: Component = 'img', className, orientation } = _a, rest = tslib_es6.__rest(_a, ["children", "as", "className", "orientation"]); return (React.createElement(Component, Object.assign({ className: index.default(orientation ? `card-img-${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