@coreui/react
Version:
UI Components Library for React.js
28 lines (25 loc) • 1.17 kB
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 CImage = forwardRef(function (_a, ref) {
var _b;
var align = _a.align, className = _a.className, fluid = _a.fluid, rounded = _a.rounded, thumbnail = _a.thumbnail, rest = __rest(_a, ["align", "className", "fluid", "rounded", "thumbnail"]);
return (React.createElement("img", __assign({ className: classNames((_b = {},
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
_b['d-block mx-auto'] = align && align === 'center',
_b['img-fluid'] = fluid,
_b.rounded = rounded,
_b['img-thumbnail'] = thumbnail,
_b), className) || undefined }, rest, { ref: ref })));
});
CImage.propTypes = {
align: PropTypes.oneOf(['start', 'center', 'end']),
className: PropTypes.string,
fluid: PropTypes.bool,
rounded: PropTypes.bool,
thumbnail: PropTypes.bool,
};
CImage.displayName = 'CImage';
export { CImage };
//# sourceMappingURL=CImage.js.map