tek-wallet 0.0.799 → 0.0.800

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.
@@ -14,12 +14,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var jsx_runtime_1 = require("react/jsx-runtime");
15
15
  var material_1 = require("@mui/material");
16
16
  var ThemeProvider_1 = require("../../../providers/ThemeProvider");
17
+ var react_1 = require("react");
17
18
  var ItemsContainer = function (props) {
18
19
  return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%", position: "relative" }, props.sx), children: props.children }));
19
20
  };
20
21
  function Menu(props) {
21
22
  var theme = (0, ThemeProvider_1.useTheme)();
22
23
  var items = props.items;
23
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ display: "grid", gridTemplateColumns: "repeat(4, 1fr)", paddingTop: theme.mixins.customPadding.p8, paddingBottom: theme.mixins.customPadding.p8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, border: "1px solid ".concat(theme.palette.border.accent3) }, props.sx), children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(ItemsContainer, { children: item }, index)); }) }));
24
+ var itemsLength = (0, react_1.useMemo)(function () {
25
+ return items === null || items === void 0 ? void 0 : items.length;
26
+ }, [items]);
27
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ display: "grid", gridTemplateColumns: "repeat(".concat(itemsLength || 1, ", 1fr)"), paddingTop: theme.mixins.customPadding.p8, paddingBottom: theme.mixins.customPadding.p8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, border: "1px solid ".concat(theme.palette.border.accent3) }, props.sx), children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(ItemsContainer, { children: item }, index)); }) }));
24
28
  }
25
29
  exports.default = Menu;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.799",
3
+ "version": "0.0.800",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",