@ssplib/react-components 0.0.198 → 0.0.200
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.
- package/components/navbar/TabNavBar.js +17 -11
- package/package.json +1 -1
|
@@ -104,18 +104,24 @@ function TabNavBar(_a) {
|
|
|
104
104
|
react_1.default.createElement(link_1.default, { href: '/' }, next ? react_1.default.createElement(image_1.default, { src: img, alt: title, width: 40, height: 40 }) : react_1.default.createElement("img", { src: img, height: 35 })),
|
|
105
105
|
react_1.default.createElement(material_1.Box, null,
|
|
106
106
|
react_1.default.createElement(material_1.Typography, { variant: 'subtitle1', fontWeight: 600 }, title))),
|
|
107
|
-
react_1.default.createElement(material_1.Stack, { direction: 'row', width: '100%', justifyContent: 'center', alignItems: 'center', spacing: 2 }, links.map((x) =>
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', width: '100%', justifyContent: 'center', alignItems: 'center', spacing: 2, sx: { display: { xs: 'none', md: 'flex' } } }, links.map((x) => {
|
|
108
|
+
var _a;
|
|
109
|
+
return (react_1.default.createElement(material_1.Box
|
|
110
110
|
// borderBottom={next ? (router?.pathname.startsWith(x.path) ? `solid 2px ${color}` : '') : `solid 2px ${color}`}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
, {
|
|
112
|
+
// borderBottom={next ? (router?.pathname.startsWith(x.path) ? `solid 2px ${color}` : '') : `solid 2px ${color}`}
|
|
113
|
+
borderBottom: next ? (verificarRota((_a = router === null || router === void 0 ? void 0 : router.pathname) !== null && _a !== void 0 ? _a : '', x.path) ? `solid 4px ${color}` : '') : verificarRota(route, x.path) ? `solid 4px ${color}` : '', height: '100%', paddingX: 2, sx: {
|
|
114
|
+
':hover': {
|
|
115
|
+
backgroundColor: '#fcfcfc',
|
|
116
|
+
cursor: 'pointer',
|
|
117
|
+
userSelect: 'none',
|
|
118
|
+
},
|
|
119
|
+
}, onClick: (e) => {
|
|
120
|
+
next && console.log('pathname:', router === null || router === void 0 ? void 0 : router.pathname, ':=', x.path);
|
|
121
|
+
changeRoute(e, x.path);
|
|
122
|
+
} },
|
|
123
|
+
react_1.default.createElement(material_1.Stack, { height: '95%', justifyContent: 'center' }, x.name)));
|
|
124
|
+
})),
|
|
119
125
|
react_1.default.createElement(material_1.Box, { sx: {
|
|
120
126
|
display: {
|
|
121
127
|
xs: 'flex',
|