Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Media.js 1.0KB

1234567891011121314151617181920212223
  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 './utils/createWithBsPrefix';
  6. import { useBootstrapPrefix } from './ThemeProvider';
  7. var Media = React.forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
  8. function (_ref, ref) {
  9. var bsPrefix = _ref.bsPrefix,
  10. className = _ref.className,
  11. _ref$as = _ref.as,
  12. Component = _ref$as === void 0 ? 'div' : _ref$as,
  13. props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "as"]);
  14. var prefix = useBootstrapPrefix(bsPrefix, 'media');
  15. return React.createElement(Component, _extends({}, props, {
  16. ref: ref,
  17. className: classNames(className, prefix)
  18. }));
  19. });
  20. Media.displayName = 'Media';
  21. Media.Body = createWithBsPrefix('media-body');
  22. export default Media;