1 | import _extends from "@babel/runtime/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
3 | var _excluded = ["bsPrefix", "className", "as"];
|
4 | import classNames from 'classnames';
|
5 | import React from 'react';
|
6 | import createWithBsPrefix from './createWithBsPrefix';
|
7 | import { useBootstrapPrefix } from './ThemeProvider';
|
8 | var MediaBody = createWithBsPrefix('media-body');
|
9 | var Media = React.forwardRef(
|
10 | function (_ref, ref) {
|
11 | var bsPrefix = _ref.bsPrefix,
|
12 | className = _ref.className,
|
13 | _ref$as = _ref.as,
|
14 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
15 | props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
16 |
|
17 | var prefix = useBootstrapPrefix(bsPrefix, 'media');
|
18 | return React.createElement(Component, _extends({}, props, {
|
19 | ref: ref,
|
20 | className: classNames(className, prefix)
|
21 | }));
|
22 | });
|
23 | Media.displayName = 'Media';
|
24 | Media.Body = MediaBody;
|
25 | export default Media; |
\ | No newline at end of file |