@ssplib/react-components 0.0.171 → 0.0.172
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export default function NavBar({ links, title, img, pos, next, el, menuItems, logoutMsg, }: {
|
|
2
|
+
export default function NavBar({ links, title, img, pos, next, el, menuItems, logoutMsg, ...props }: {
|
|
3
3
|
links: {
|
|
4
4
|
name: string;
|
|
5
5
|
path: string;
|
|
@@ -22,6 +22,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
25
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
38
|
};
|
|
@@ -37,7 +48,8 @@ const link_1 = __importDefault(require("next/link"));
|
|
|
37
48
|
const router_1 = require("next/router");
|
|
38
49
|
const react_1 = __importStar(require("react"));
|
|
39
50
|
const auth_1 = require("../../context/auth");
|
|
40
|
-
function NavBar(
|
|
51
|
+
function NavBar(_a) {
|
|
52
|
+
var { links, title, img, pos = 'fixed', next = true, el, menuItems, logoutMsg = 'Sair' } = _a, props = __rest(_a, ["links", "title", "img", "pos", "next", "el", "menuItems", "logoutMsg"]);
|
|
41
53
|
let router = undefined;
|
|
42
54
|
if (next)
|
|
43
55
|
router = (0, router_1.useRouter)();
|
|
@@ -80,7 +92,7 @@ function NavBar({ links, title, img, pos = 'fixed', next = true, el, menuItems,
|
|
|
80
92
|
react_1.default.createElement(material_1.Menu, { open: menuOpen, onClose: closeMenu, anchorEl: anchor }, links.map((x) => (react_1.default.createElement(material_1.MenuItem, { key: `navmenu${x}`, onClick: (e) => onMenuItemClick(e, x.path) },
|
|
81
93
|
react_1.default.createElement(material_1.Typography, { textTransform: 'capitalize' }, x.name)))))),
|
|
82
94
|
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'flex-end', alignItems: 'center', sx: { width: { md: '100%' } } },
|
|
83
|
-
react_1.default.createElement(material_1.Stack, { direction: 'row', spacing: 2, sx: { display: { xs: 'none', md: 'flex' } } }, links.map((x) => (react_1.default.createElement(material_1.Box, { key: `navigation${x}`, sx: {
|
|
95
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', spacing: 2, sx: { display: { xs: 'none', md: 'flex' } } }, links.map((x) => (react_1.default.createElement(material_1.Box, { key: `navigation${x.path}`, sx: {
|
|
84
96
|
a: {
|
|
85
97
|
color: '#2c7da0',
|
|
86
98
|
textDecoration: 'none',
|