UNPKG

@coreui/react-pro

Version:

UI Components Library for React.js

20 lines (17 loc) 843 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'; const CCardImage = forwardRef((_a, ref) => { var { children, as: Component = 'img', className, orientation } = _a, rest = __rest(_a, ["children", "as", "className", "orientation"]); return (React.createElement(Component, Object.assign({ className: classNames(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'; export { CCardImage }; //# sourceMappingURL=CCardImage.js.map