tek-wallet 0.0.193 → 0.0.194

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.
@@ -32,11 +32,11 @@ var Text_1 = __importDefault(require("../Text"));
32
32
  var parsePropsData_1 = __importDefault(require("../../../utils/parsePropsData"));
33
33
  var material_1 = require("@mui/material");
34
34
  var NetworkSelection = function (props) {
35
- var networkDataString = props.networkData, rest = __rest(props, ["networkData"]);
35
+ var networkDataString = props.networkData, onClick = props.onClick, rest = __rest(props, ["networkData", "onClick"]);
36
36
  var theme = (0, material_1.useTheme)();
37
37
  var networkData = (0, react_1.useMemo)(function () { return (0, parsePropsData_1.default)(networkDataString); }, [networkDataString]);
38
38
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({}, rest, { sx: __assign(__assign({}, theme.mixins.row), { backgroundColor: props.active
39
39
  ? "background.secondary16"
40
- : "background.white16", padding: "".concat(theme.mixins.customPadding.p16, " ").concat(theme.mixins.customPadding.p8), borderRadius: theme.mixins.theBorderRadius.r12, border: "1px solid", borderColor: props.active ? "border.secondary" : "border.white24", gap: theme.mixins.gaps.g8 }), onClick: function () { var _a; return (_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, networkData); }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: networkData === null || networkData === void 0 ? void 0 : networkData.icon, sx: { borderRadius: theme.mixins.theBorderRadius.full }, width: 24 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: "text.white", whiteSpace: "nowrap", textTransform: "capitalize" }), children: networkData === null || networkData === void 0 ? void 0 : networkData.name })] })));
40
+ : "background.white16", padding: "".concat(theme.mixins.customPadding.p16, " ").concat(theme.mixins.customPadding.p8), borderRadius: theme.mixins.theBorderRadius.r12, border: "1px solid", borderColor: props.active ? "border.secondary" : "border.white24", gap: theme.mixins.gaps.g8 }), onClick: function () { return onClick === null || onClick === void 0 ? void 0 : onClick(networkData); }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: networkData === null || networkData === void 0 ? void 0 : networkData.icon, sx: { borderRadius: theme.mixins.theBorderRadius.full }, width: 24 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: "text.white", whiteSpace: "nowrap", textTransform: "capitalize" }), children: networkData === null || networkData === void 0 ? void 0 : networkData.name })] })));
41
41
  };
42
42
  exports.default = NetworkSelection;
@@ -33,7 +33,7 @@ var Text_1 = __importDefault(require("../Text"));
33
33
  var Icon_1 = __importDefault(require("../Icon"));
34
34
  var material_1 = require("@mui/material");
35
35
  var TokenSelection = function (props) {
36
- var tokenDataString = props.tokenData, sx = props.sx, rest = __rest(props, ["tokenData", "sx"]);
36
+ var tokenDataString = props.tokenData, sx = props.sx, onClick = props.onClick, rest = __rest(props, ["tokenData", "sx", "onClick"]);
37
37
  var theme = (0, material_1.useTheme)();
38
38
  var tokenData = (0, react_1.useMemo)(function () { return (0, parsePropsData_1.default)(tokenDataString); }, [tokenDataString]);
39
39
  var balance = (0, react_1.useMemo)(function () {
@@ -45,7 +45,7 @@ var TokenSelection = function (props) {
45
45
  var _a;
46
46
  return balance * +((_a = tokenData === null || tokenData === void 0 ? void 0 : tokenData.usd_rate) !== null && _a !== void 0 ? _a : 0);
47
47
  }, [balance, tokenData]);
48
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ onClick: function () { var _a; return (_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, tokenData); }, sx: __assign({ backgroundColor: props.active
48
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ onClick: function () { return onClick === null || onClick === void 0 ? void 0 : onClick(tokenData); }, sx: __assign({ backgroundColor: props.active
49
49
  ? "background.secondary16"
50
50
  : "background.white16", border: "1px solid", borderColor: props.active ? "border.secondary" : "transparent", borderRadius: theme.mixins.theBorderRadius.r16, padding: theme.mixins.customPadding.p12, display: "flex", alignItems: "center", cursor: "pointer" }, sx) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 20, src: tokenData === null || tokenData === void 0 ? void 0 : tokenData.icon }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.full_name })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { marginLeft: "auto", alignItems: "end" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balanceInUSD, start: "~ $" }) })] })] })));
51
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.193",
3
+ "version": "0.0.194",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",