Dashboard sipadu mbip
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

FigureImage.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 PropTypes from 'prop-types';
  5. import React from 'react';
  6. import Image from './Image';
  7. var propTypes = {
  8. /**
  9. * @default 'img'
  10. */
  11. bsPrefix: PropTypes.string,
  12. /**
  13. * Sets image as fluid image.
  14. */
  15. fluid: PropTypes.bool,
  16. /**
  17. * Sets image shape as rounded.
  18. */
  19. rounded: PropTypes.bool,
  20. /**
  21. * Sets image shape as circle.
  22. */
  23. roundedCircle: PropTypes.bool,
  24. /**
  25. * Sets image shape as thumbnail.
  26. */
  27. thumbnail: PropTypes.bool
  28. };
  29. var defaultProps = {
  30. fluid: true
  31. };
  32. var FigureImage = React.forwardRef(function (_ref, ref) {
  33. var className = _ref.className,
  34. props = _objectWithoutPropertiesLoose(_ref, ["className"]);
  35. return React.createElement(Image, _extends({
  36. ref: ref
  37. }, props, {
  38. className: classNames(className, 'figure-img')
  39. }));
  40. });
  41. FigureImage.displayName = 'FigureImage';
  42. FigureImage.propTypes = propTypes;
  43. FigureImage.defaultProps = defaultProps;
  44. export default FigureImage;