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