@twreporter/react-components 9.2.0-rc.2 → 9.2.0

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.
@@ -25,7 +25,9 @@ var OuterContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
25
25
  var Container = /*#__PURE__*/_styledComponents["default"].div.withConfig({
26
26
  displayName: "empty-state__Container",
27
27
  componentId: "sc-4ba2ko-1"
28
- })(["display:flex;flex-direction:column;align-items:center;max-width:280px;"]);
28
+ })(["display:flex;flex-direction:column;align-items:center;max-width:", ";"], function (props) {
29
+ return props.$maxWidth;
30
+ });
29
31
  var TextContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
30
32
  displayName: "empty-state__TextContainer",
31
33
  componentId: "sc-4ba2ko-2"
@@ -57,7 +59,9 @@ var EmptyState = function EmptyState(_ref) {
57
59
  _ref$buttonUrl = _ref.buttonUrl,
58
60
  buttonUrl = _ref$buttonUrl === void 0 ? '/' : _ref$buttonUrl,
59
61
  _ref$buttonOnclick = _ref.buttonOnclick,
60
- buttonOnclick = _ref$buttonOnclick === void 0 ? defaultFunc : _ref$buttonOnclick;
62
+ buttonOnclick = _ref$buttonOnclick === void 0 ? defaultFunc : _ref$buttonOnclick,
63
+ _ref$maxWidth = _ref.maxWidth,
64
+ maxWidth = _ref$maxWidth === void 0 ? '280px' : _ref$maxWidth;
61
65
  var imageUrl = '';
62
66
  var imageWidth = '';
63
67
  switch (style) {
@@ -75,7 +79,9 @@ var EmptyState = function EmptyState(_ref) {
75
79
  imageWidth = '177';
76
80
  break;
77
81
  }
78
- return /*#__PURE__*/_react["default"].createElement(OuterContainer, null, /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement("img", {
82
+ return /*#__PURE__*/_react["default"].createElement(OuterContainer, null, /*#__PURE__*/_react["default"].createElement(Container, {
83
+ $maxWidth: maxWidth
84
+ }, /*#__PURE__*/_react["default"].createElement("img", {
79
85
  src: imageUrl,
80
86
  width: imageWidth
81
87
  }), /*#__PURE__*/_react["default"].createElement(TextContainer, null, /*#__PURE__*/_react["default"].createElement(_paragraph.P1, {
@@ -100,7 +106,8 @@ EmptyState.propTypes = {
100
106
  showButton: _propTypes["default"].bool,
101
107
  buttonText: _propTypes["default"].string,
102
108
  buttonUrl: _propTypes["default"].string,
103
- buttonOnclick: _propTypes["default"].func
109
+ buttonOnclick: _propTypes["default"].func,
110
+ maxWidth: _propTypes["default"].string
104
111
  };
105
112
  EmptyState.Style = _enums.Style;
106
113
  var _default = exports["default"] = EmptyState;
@@ -24,6 +24,7 @@ var emptyState = exports.emptyState = {
24
24
  guide: '文字文字',
25
25
  showButton: true,
26
26
  buttonText: '按鈕',
27
- buttonUrl: '/'
27
+ buttonUrl: '/',
28
+ maxWidth: '80vw'
28
29
  }
29
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twreporter/react-components",
3
- "version": "9.2.0-rc.2",
3
+ "version": "9.2.0",
4
4
  "main": "lib/index.js",
5
5
  "repository": "https://github.com/twreporter/twreporter-npm-packages.git",
6
6
  "author": "twreporter <developer@twreporter.org>",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@twreporter/core": "^1.22.1",
19
- "@twreporter/redux": "^8.1.0-rc.1",
19
+ "@twreporter/redux": "^8.1.0",
20
20
  "fontfaceobserver-es": "^3.3.3",
21
21
  "hoist-non-react-statics": "^2.3.1",
22
22
  "lodash": "^4.0.0",
@@ -38,19 +38,21 @@
38
38
  "@babel/preset-env": "^7.23.2",
39
39
  "@babel/preset-react": "^7.22.15",
40
40
  "@babel/preset-typescript": "^7.23.2",
41
- "@storybook/addon-actions": "^7.5.2",
42
- "@storybook/addon-essentials": "^7.5.2",
43
- "@storybook/addon-interactions": "^7.5.2",
44
- "@storybook/addon-links": "^7.5.2",
45
- "@storybook/addon-mdx-gfm": "^7.5.2",
46
- "@storybook/addon-viewport": "^7.5.2",
47
- "@storybook/react": "^7.5.2",
48
- "@storybook/react-webpack5": "^7.5.2",
49
- "@storybook/testing-library": "^0.2.2",
41
+ "@chromatic-com/storybook": "^1",
42
+ "@storybook/addon-actions": "^8.1.11",
43
+ "@storybook/addon-essentials": "^8.1.11",
44
+ "@storybook/addon-interactions": "^8.1.11",
45
+ "@storybook/addon-links": "^8.1.11",
46
+ "@storybook/addon-viewport": "^8.1.11",
47
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
48
+ "@storybook/manager-api": "^8.1.11",
49
+ "@storybook/react": "^8.1.11",
50
+ "@storybook/react-webpack5": "^8.1.11",
51
+ "@storybook/test": "^8.1.11",
50
52
  "babel-loader": "^8.2.4",
51
53
  "chromatic": "^6.5.4",
52
54
  "react-dom": "^18.2.0",
53
- "storybook": "^7.5.2"
55
+ "storybook": "^8.1.11"
54
56
  },
55
- "gitHead": "d3003a89e37a0f2ef1fe5e5424b6d6e13a9028db"
57
+ "gitHead": "0333b9da9f6a35f1bb9210d966edfb7a0ad8b7a6"
56
58
  }