@arcblock/ux 2.4.16 → 2.4.17

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.
@@ -7,13 +7,13 @@ exports.default = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _Icon = _interopRequireDefault(require("../Icon"));
10
+ var _EmptyIcon = _interopRequireDefault(require("@arcblock/icons/lib/EmptyIcon"));
11
11
 
12
12
  var _Theme = require("../Theme");
13
13
 
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
- const _excluded = ["name", "color", "size", "children"];
16
+ const _excluded = ["color", "size", "children"];
17
17
 
18
18
  var _templateObject;
19
19
 
@@ -35,7 +35,6 @@ const Wrapper = (0, _Theme.styled)('div')(_templateObject || (_templateObject =
35
35
 
36
36
  function Empty(_ref) {
37
37
  let {
38
- name,
39
38
  color,
40
39
  size,
41
40
  children
@@ -43,11 +42,13 @@ function Empty(_ref) {
43
42
  rest = _objectWithoutProperties(_ref, _excluded);
44
43
 
45
44
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, _objectSpread(_objectSpread({}, rest), {}, {
46
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
47
- name: name,
48
- size: size,
49
- className: "empty-icon",
50
- color: color
45
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyIcon.default, {
46
+ style: {
47
+ width: size,
48
+ height: size,
49
+ color
50
+ },
51
+ className: "empty-icon"
51
52
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
52
53
  className: "empty-content",
53
54
  children: children
@@ -57,13 +58,11 @@ function Empty(_ref) {
57
58
 
58
59
  Empty.propTypes = {
59
60
  color: _propTypes.default.string,
60
- name: _propTypes.default.string,
61
61
  size: _propTypes.default.number,
62
62
  children: _propTypes.default.any
63
63
  };
64
64
  Empty.defaultProps = {
65
65
  color: 'inherit',
66
- name: 'inbox',
67
66
  size: 36,
68
67
  children: null
69
68
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.4.16",
3
+ "version": "2.4.17",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -47,10 +47,10 @@
47
47
  "react": ">=18.1.0",
48
48
  "react-ga": "^2.7.0"
49
49
  },
50
- "gitHead": "adc624cfa03a01f24cb7d78bc35b6ed54664935e",
50
+ "gitHead": "074d03aa938b1a9f52d2d9ef2bb8d68bb08d061e",
51
51
  "dependencies": {
52
- "@arcblock/icons": "^2.4.16",
53
- "@arcblock/react-hooks": "^2.4.16",
52
+ "@arcblock/icons": "^2.4.17",
53
+ "@arcblock/react-hooks": "^2.4.17",
54
54
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
55
55
  "@emotion/react": "^11.10.0",
56
56
  "@emotion/styled": "^11.10.0",
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
-
3
- import Icon from '../Icon';
2
+ import EmptyIcon from '@arcblock/icons/lib/EmptyIcon';
4
3
  import { styled } from '../Theme';
5
4
 
6
5
  const Wrapper = styled('div')`
@@ -16,10 +15,10 @@ const Wrapper = styled('div')`
16
15
  }
17
16
  `;
18
17
 
19
- function Empty({ name, color, size, children, ...rest }) {
18
+ function Empty({ color, size, children, ...rest }) {
20
19
  return (
21
20
  <Wrapper {...rest}>
22
- <Icon name={name} size={size} className="empty-icon" color={color} />
21
+ <EmptyIcon style={{ width: size, height: size, color }} className="empty-icon" />
23
22
  <div className="empty-content">{children}</div>
24
23
  </Wrapper>
25
24
  );
@@ -27,13 +26,11 @@ function Empty({ name, color, size, children, ...rest }) {
27
26
 
28
27
  Empty.propTypes = {
29
28
  color: PropTypes.string,
30
- name: PropTypes.string,
31
29
  size: PropTypes.number,
32
30
  children: PropTypes.any,
33
31
  };
34
32
  Empty.defaultProps = {
35
33
  color: 'inherit',
36
- name: 'inbox',
37
34
  size: 36,
38
35
  children: null,
39
36
  };