@quintype/components 3.8.6 → 3.8.7-decode-image.2
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/dist/cjs/index.js
CHANGED
|
@@ -1926,10 +1926,14 @@ function responsiveProps(props) {
|
|
|
1926
1926
|
}, props.imgParams));
|
|
1927
1927
|
}
|
|
1928
1928
|
|
|
1929
|
+
var resolvePath = function resolvePath(size) {
|
|
1930
|
+
return props.shouldDecode ? decodeURIComponent(generatePath(size)) : generatePath(size);
|
|
1931
|
+
};
|
|
1932
|
+
|
|
1929
1933
|
var imageProps = {
|
|
1930
|
-
src:
|
|
1934
|
+
src: resolvePath(props.defaultWidth),
|
|
1931
1935
|
srcSet: props.widths ? props.widths.map(function (size) {
|
|
1932
|
-
return "".concat(
|
|
1936
|
+
return "".concat(resolvePath(size), " ").concat(size, "w");
|
|
1933
1937
|
}).join(',') : undefined,
|
|
1934
1938
|
key: hashString(props.slug),
|
|
1935
1939
|
sizes: props === null || props === void 0 ? void 0 : props.sizes
|
|
@@ -31,10 +31,14 @@ export function responsiveProps(props) {
|
|
|
31
31
|
}, props.imgParams));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
var resolvePath = function resolvePath(size) {
|
|
35
|
+
return props.shouldDecode ? decodeURIComponent(generatePath(size)) : generatePath(size);
|
|
36
|
+
};
|
|
37
|
+
|
|
34
38
|
var imageProps = {
|
|
35
|
-
src:
|
|
39
|
+
src: resolvePath(props.defaultWidth),
|
|
36
40
|
srcSet: props.widths ? props.widths.map(function (size) {
|
|
37
|
-
return "".concat(
|
|
41
|
+
return "".concat(resolvePath(size), " ").concat(size, "w");
|
|
38
42
|
}).join(',') : undefined,
|
|
39
43
|
key: hashString(props.slug),
|
|
40
44
|
sizes: props === null || props === void 0 ? void 0 : props.sizes
|