@micromag/element-author 0.3.811 → 0.3.813
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.
- package/es/index.js +4 -3
- package/package.json +6 -6
package/es/index.js
CHANGED
|
@@ -7,7 +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 {
|
|
10
|
+
import { useSetting } from '@micromag/core/contexts';
|
|
11
11
|
|
|
12
12
|
var styles$1 = {"container":"micromag-element-author-avatar-container","shapeCircle":"micromag-element-author-avatar-shapeCircle","shape":"micromag-element-author-avatar-shape"};
|
|
13
13
|
|
|
@@ -40,9 +40,10 @@ var Avatar = function Avatar(_ref) {
|
|
|
40
40
|
isTag = _ref.isTag,
|
|
41
41
|
className = _ref.className,
|
|
42
42
|
shouldLoad = _ref.shouldLoad;
|
|
43
|
-
var supportsWebp =
|
|
43
|
+
var supportsWebp = useSetting('supportsWebp', false);
|
|
44
|
+
var imageResolution = useSetting('imageResolution', resolution);
|
|
44
45
|
var imageAtSize = getOptimalImageUrl(image, width, height, {
|
|
45
|
-
resolution:
|
|
46
|
+
resolution: imageResolution,
|
|
46
47
|
supportsWebp: supportsWebp
|
|
47
48
|
});
|
|
48
49
|
var finalShape = shape !== null ? pascalCase(shape) : null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-author",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.813",
|
|
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.
|
|
63
|
-
"@micromag/element-button": "^0.3.
|
|
64
|
-
"@micromag/element-link": "^0.3.
|
|
65
|
-
"@micromag/element-text": "^0.3.
|
|
62
|
+
"@micromag/core": "^0.3.813",
|
|
63
|
+
"@micromag/element-button": "^0.3.813",
|
|
64
|
+
"@micromag/element-link": "^0.3.813",
|
|
65
|
+
"@micromag/element-text": "^0.3.813",
|
|
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": "
|
|
76
|
+
"gitHead": "24f52ddea5f0ee918f594af86c3c8fd2e1b6f289"
|
|
77
77
|
}
|