@ndla/image-search 5.1.46 → 5.1.48
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/ImageSearchResult.js +3 -3
- package/es/PreviewImage.js +2 -2
- package/lib/ImageSearchResult.js +3 -3
- package/lib/PreviewImage.js +2 -2
- package/package.json +3 -3
package/es/ImageSearchResult.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import
|
|
10
|
+
import { ButtonV2 } from '@ndla/button';
|
|
11
11
|
import PreviewImage from './PreviewImage';
|
|
12
12
|
import { getPreviewSrcSets } from './util/imageUtil';
|
|
13
13
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
@@ -25,9 +25,9 @@ export default function ImageSearchResult(_ref) {
|
|
|
25
25
|
className: "list-item ".concat(active),
|
|
26
26
|
children: [_jsx("div", {
|
|
27
27
|
className: "list-item-inner",
|
|
28
|
-
children: _jsxs(
|
|
28
|
+
children: _jsxs(ButtonV2, {
|
|
29
|
+
variant: "stripped",
|
|
29
30
|
"data-cy": "select-image-from-list",
|
|
30
|
-
stripped: true,
|
|
31
31
|
onClick: function onClick() {
|
|
32
32
|
return onImageClick(image);
|
|
33
33
|
},
|
package/es/PreviewImage.js
CHANGED
|
@@ -14,7 +14,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
14
14
|
|
|
15
15
|
import React, { useState } from 'react';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
|
-
import
|
|
17
|
+
import { ButtonV2 } from '@ndla/button';
|
|
18
18
|
import { uuid } from '@ndla/util';
|
|
19
19
|
import { CheckboxItem } from '@ndla/forms';
|
|
20
20
|
import { getSrcSets } from './util/imageUtil';
|
|
@@ -99,7 +99,7 @@ var PreviewImage = function PreviewImage(_ref) {
|
|
|
99
99
|
children: "#".concat(tag)
|
|
100
100
|
}, uuid());
|
|
101
101
|
})
|
|
102
|
-
}), _jsx(
|
|
102
|
+
}), _jsx(ButtonV2, {
|
|
103
103
|
"data-cy": "use-image",
|
|
104
104
|
onClick: function onClick() {
|
|
105
105
|
return onSelectImage(image, saveAsMetaImage);
|
package/lib/ImageSearchResult.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = ImageSearchResult;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _button =
|
|
8
|
+
var _button = require("@ndla/button");
|
|
9
9
|
var _PreviewImage = _interopRequireDefault(require("./PreviewImage"));
|
|
10
10
|
var _imageUtil = require("./util/imageUtil");
|
|
11
11
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
@@ -31,9 +31,9 @@ function ImageSearchResult(_ref) {
|
|
|
31
31
|
className: "list-item ".concat(active),
|
|
32
32
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
33
33
|
className: "list-item-inner",
|
|
34
|
-
children: (0, _jsxRuntime.jsxs)(_button
|
|
34
|
+
children: (0, _jsxRuntime.jsxs)(_button.ButtonV2, {
|
|
35
|
+
variant: "stripped",
|
|
35
36
|
"data-cy": "select-image-from-list",
|
|
36
|
-
stripped: true,
|
|
37
37
|
onClick: function onClick() {
|
|
38
38
|
return onImageClick(image);
|
|
39
39
|
},
|
package/lib/PreviewImage.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactI18next = require("react-i18next");
|
|
10
|
-
var _button =
|
|
10
|
+
var _button = require("@ndla/button");
|
|
11
11
|
var _util = require("@ndla/util");
|
|
12
12
|
var _forms = require("@ndla/forms");
|
|
13
13
|
var _imageUtil = require("./util/imageUtil");
|
|
@@ -100,7 +100,7 @@ var PreviewImage = function PreviewImage(_ref) {
|
|
|
100
100
|
children: "#".concat(tag)
|
|
101
101
|
}, (0, _util.uuid)());
|
|
102
102
|
})
|
|
103
|
-
}), (0, _jsxRuntime.jsx)(_button
|
|
103
|
+
}), (0, _jsxRuntime.jsx)(_button.ButtonV2, {
|
|
104
104
|
"data-cy": "use-image",
|
|
105
105
|
onClick: function onClick() {
|
|
106
106
|
return onSelectImage(image, saveAsMetaImage);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/image-search",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.48",
|
|
4
4
|
"description": "A simple library for searching images from NDLA",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@ndla/forms": "^4.2.7",
|
|
32
32
|
"@ndla/icons": "^2.2.3",
|
|
33
33
|
"@ndla/pager": "^2.1.18",
|
|
34
|
-
"@ndla/ui": "^34.6.
|
|
34
|
+
"@ndla/ui": "^34.6.5",
|
|
35
35
|
"@ndla/util": "^3.1.10",
|
|
36
36
|
"pretty-bytes": "^5.6.0"
|
|
37
37
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "3d64cbc44a2f35c0e086a7b701765dfb34a40c04"
|
|
50
50
|
}
|