@micromag/element-author 0.3.807 → 0.3.812

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/es/index.js +4 -1
  2. package/package.json +6 -6
package/es/index.js CHANGED
@@ -7,6 +7,7 @@ import { PropTypes as PropTypes$1 } from '@micromag/core';
7
7
  import { getOptimalImageUrl, pascalCase, isTextFilled } from '@micromag/core/utils';
8
8
  import Link from '@micromag/element-link';
9
9
  import Text from '@micromag/element-text';
10
+ import { useSupportsWebp } from '@micromag/core/hooks';
10
11
 
11
12
  var styles$1 = {"container":"micromag-element-author-avatar-container","shapeCircle":"micromag-element-author-avatar-shapeCircle","shape":"micromag-element-author-avatar-shape"};
12
13
 
@@ -39,8 +40,10 @@ var Avatar = function Avatar(_ref) {
39
40
  isTag = _ref.isTag,
40
41
  className = _ref.className,
41
42
  shouldLoad = _ref.shouldLoad;
43
+ var supportsWebp = useSupportsWebp();
42
44
  var imageAtSize = getOptimalImageUrl(image, width, height, {
43
- resolution: resolution
45
+ resolution: resolution,
46
+ supportsWebp: supportsWebp
44
47
  });
45
48
  var finalShape = shape !== null ? pascalCase(shape) : null;
46
49
  return /*#__PURE__*/React.createElement("span", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-author",
3
- "version": "0.3.807",
3
+ "version": "0.3.812",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -59,10 +59,10 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.807",
63
- "@micromag/element-button": "^0.3.807",
64
- "@micromag/element-link": "^0.3.807",
65
- "@micromag/element-text": "^0.3.807",
62
+ "@micromag/core": "^0.3.812",
63
+ "@micromag/element-button": "^0.3.812",
64
+ "@micromag/element-link": "^0.3.812",
65
+ "@micromag/element-text": "^0.3.812",
66
66
  "classnames": "^2.2.6",
67
67
  "lodash": "^4.17.21",
68
68
  "prop-types": "^15.7.2",
@@ -73,5 +73,5 @@
73
73
  "access": "public",
74
74
  "registry": "https://registry.npmjs.org/"
75
75
  },
76
- "gitHead": "5aee5186c7e3b3dc6fe0f11e848943f21c33a195"
76
+ "gitHead": "34ea72adfaffec7c33e328b9c46301cd18cbde83"
77
77
  }