1 | import _extends from "@babel/runtime/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
3 | var _excluded = ["bsPrefix", "className", "fluid", "rounded", "roundedCircle", "thumbnail"];
|
4 | import classNames from 'classnames';
|
5 | import React from 'react';
|
6 | import PropTypes from 'prop-types';
|
7 | import { useBootstrapPrefix } from './ThemeProvider';
|
8 | export var propTypes = {
|
9 | |
10 |
|
11 |
|
12 | bsPrefix: PropTypes.string,
|
13 |
|
14 | |
15 |
|
16 |
|
17 | fluid: PropTypes.bool,
|
18 |
|
19 | |
20 |
|
21 |
|
22 | rounded: PropTypes.bool,
|
23 |
|
24 | |
25 |
|
26 |
|
27 | roundedCircle: PropTypes.bool,
|
28 |
|
29 | |
30 |
|
31 |
|
32 | thumbnail: PropTypes.bool
|
33 | };
|
34 | var defaultProps = {
|
35 | fluid: false,
|
36 | rounded: false,
|
37 | roundedCircle: false,
|
38 | thumbnail: false
|
39 | };
|
40 | var Image = React.forwardRef(function (_ref, ref) {
|
41 | var bsPrefix = _ref.bsPrefix,
|
42 | className = _ref.className,
|
43 | fluid = _ref.fluid,
|
44 | rounded = _ref.rounded,
|
45 | roundedCircle = _ref.roundedCircle,
|
46 | thumbnail = _ref.thumbnail,
|
47 | props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
48 |
|
49 | bsPrefix = useBootstrapPrefix(bsPrefix, 'img');
|
50 | var classes = classNames(fluid && bsPrefix + "-fluid", rounded && "rounded", roundedCircle && "rounded-circle", thumbnail && bsPrefix + "-thumbnail");
|
51 | return React.createElement("img", _extends({
|
52 |
|
53 | ref: ref
|
54 | }, props, {
|
55 | className: classNames(className, classes)
|
56 | }));
|
57 | });
|
58 | Image.displayName = 'Image';
|
59 | Image.defaultProps = defaultProps;
|
60 | export default Image; |
\ | No newline at end of file |