Dashboard sipadu mbip
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CardImg.js 1.1KB

1234567891011121314151617181920212223242526
  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 { useBootstrapPrefix } from './ThemeProvider';
  6. var defaultProps = {
  7. variant: null
  8. };
  9. var CardImg = 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
  10. function (_ref, ref) {
  11. var bsPrefix = _ref.bsPrefix,
  12. className = _ref.className,
  13. variant = _ref.variant,
  14. _ref$as = _ref.as,
  15. Component = _ref$as === void 0 ? 'img' : _ref$as,
  16. props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "variant", "as"]);
  17. var prefix = useBootstrapPrefix(bsPrefix, 'card-img');
  18. return React.createElement(Component, _extends({
  19. ref: ref,
  20. className: classNames(variant ? prefix + "-" + variant : prefix, className)
  21. }, props));
  22. });
  23. CardImg.displayName = 'CardImg';
  24. CardImg.defaultProps = defaultProps;
  25. export default CardImg;