@arcblock/ux 2.1.19 → 2.1.20
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.
|
@@ -36,7 +36,7 @@ var _sidebar = _interopRequireDefault(require("./sidebar"));
|
|
|
36
36
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
37
37
|
|
|
38
38
|
const _excluded = ["closeMenu"],
|
|
39
|
-
_excluded2 = ["children", "title", "headerProps", "links"],
|
|
39
|
+
_excluded2 = ["children", "title", "headerProps", "links", "fullWidth"],
|
|
40
40
|
_excluded3 = ["legacy"];
|
|
41
41
|
|
|
42
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -72,7 +72,8 @@ function Dashboard(_ref2) {
|
|
|
72
72
|
children,
|
|
73
73
|
title,
|
|
74
74
|
headerProps,
|
|
75
|
-
links
|
|
75
|
+
links,
|
|
76
|
+
fullWidth
|
|
76
77
|
} = _ref2,
|
|
77
78
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
78
79
|
|
|
@@ -124,10 +125,13 @@ function Dashboard(_ref2) {
|
|
|
124
125
|
})
|
|
125
126
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
126
127
|
className: "dashboard-main",
|
|
127
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, {
|
|
128
|
-
className: "dashboard-content"
|
|
128
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, _objectSpread(_objectSpread({
|
|
129
|
+
className: "dashboard-content"
|
|
130
|
+
}, fullWidth && {
|
|
131
|
+
maxWidth: false
|
|
132
|
+
}), {}, {
|
|
129
133
|
children: children
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {
|
|
134
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {
|
|
131
135
|
className: "dashboard-footer"
|
|
132
136
|
})]
|
|
133
137
|
})]
|
|
@@ -139,11 +143,13 @@ Dashboard.propTypes = {
|
|
|
139
143
|
children: _propTypes.default.any.isRequired,
|
|
140
144
|
title: _propTypes.default.string,
|
|
141
145
|
links: _propTypes.default.array.isRequired,
|
|
142
|
-
headerProps: _propTypes.default.object
|
|
146
|
+
headerProps: _propTypes.default.object,
|
|
147
|
+
fullWidth: _propTypes.default.bool
|
|
143
148
|
};
|
|
144
149
|
Dashboard.defaultProps = {
|
|
145
150
|
title: 'Home',
|
|
146
|
-
headerProps: {}
|
|
151
|
+
headerProps: {},
|
|
152
|
+
fullWidth: false
|
|
147
153
|
};
|
|
148
154
|
|
|
149
155
|
const Wrapper = _styledComponents.default.div.withConfig({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/ux",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.20",
|
|
4
4
|
"description": "Common used react components for arcblock products",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"react": ">=18.1.0",
|
|
53
53
|
"react-ga": "^2.7.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "3a9597b7caac6d1466136c9e7419833eb8d50190",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@arcblock/icons": "^2.1.
|
|
58
|
-
"@arcblock/react-hooks": "^2.1.
|
|
57
|
+
"@arcblock/icons": "^2.1.20",
|
|
58
|
+
"@arcblock/react-hooks": "^2.1.20",
|
|
59
59
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
60
60
|
"@emotion/react": "^11.9.0",
|
|
61
61
|
"@emotion/styled": "^11.8.1",
|
|
@@ -25,7 +25,7 @@ function NavMenuWrapper({ closeMenu, ...rest }) {
|
|
|
25
25
|
return <NavMenu {...rest} />;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function Dashboard({ children, title, headerProps, links, ...rest }) {
|
|
28
|
+
function Dashboard({ children, title, headerProps, links, fullWidth, ...rest }) {
|
|
29
29
|
const theme = useTheme();
|
|
30
30
|
const location = useLocation();
|
|
31
31
|
const navItems = useMemo(
|
|
@@ -66,7 +66,9 @@ function Dashboard({ children, title, headerProps, links, ...rest }) {
|
|
|
66
66
|
</Box>
|
|
67
67
|
</Hidden>
|
|
68
68
|
<Box className="dashboard-main">
|
|
69
|
-
<Container className="dashboard-content"
|
|
69
|
+
<Container className="dashboard-content" {...(fullWidth && { maxWidth: false })}>
|
|
70
|
+
{children}
|
|
71
|
+
</Container>
|
|
70
72
|
<Footer className="dashboard-footer" />
|
|
71
73
|
</Box>
|
|
72
74
|
</Box>
|
|
@@ -79,11 +81,13 @@ Dashboard.propTypes = {
|
|
|
79
81
|
title: PropTypes.string,
|
|
80
82
|
links: PropTypes.array.isRequired,
|
|
81
83
|
headerProps: PropTypes.object,
|
|
84
|
+
fullWidth: PropTypes.bool,
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
Dashboard.defaultProps = {
|
|
85
88
|
title: 'Home',
|
|
86
89
|
headerProps: {},
|
|
90
|
+
fullWidth: false,
|
|
87
91
|
};
|
|
88
92
|
|
|
89
93
|
const Wrapper = styled.div`
|