@replicated/portal-components 0.0.15 → 0.0.16
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/metadata/registry.json +2 -2
- package/components/metadata/registry.md +2 -2
- package/dist/esm/index.js +4 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/top-nav.js +3 -9
- package/dist/esm/top-nav.js.map +1 -1
- package/dist/esm/update-layout.js +3 -9
- package/dist/esm/update-layout.js.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -10
- package/dist/index.js.map +1 -1
- package/dist/{top-nav-0mb1K_H0.d.mts → top-nav-IRIn66wS.d.mts} +2 -1
- package/dist/{top-nav-0mb1K_H0.d.ts → top-nav-IRIn66wS.d.ts} +2 -1
- package/dist/top-nav.d.mts +1 -1
- package/dist/top-nav.d.ts +1 -1
- package/dist/top-nav.js +3 -9
- package/dist/top-nav.js.map +1 -1
- package/dist/update-layout.js +3 -9
- package/dist/update-layout.js.map +1 -1
- package/package.json +2 -1
|
@@ -22,11 +22,12 @@ interface TopNavProps {
|
|
|
22
22
|
currentCustomerId?: string;
|
|
23
23
|
onChangeTeam?: (customerId: string) => Promise<void>;
|
|
24
24
|
userMenuChildren?: ReactNode;
|
|
25
|
+
logoutButton?: ReactNode;
|
|
25
26
|
}
|
|
26
27
|
declare const defaultTopNavLinks: TopNavLink[];
|
|
27
28
|
/**
|
|
28
29
|
* TopNav renders the hero navigation bar shown on authenticated dashboards.
|
|
29
30
|
*/
|
|
30
|
-
declare const TopNav: ({ links, hiddenLabels, additionalLinks, order, userMenuLabel, activeLabel, customerName, customers, currentCustomerId, onChangeTeam, userMenuChildren }: TopNavProps) => Promise<react_jsx_runtime.JSX.Element>;
|
|
31
|
+
declare const TopNav: ({ links, hiddenLabels, additionalLinks, order, userMenuLabel, activeLabel, customerName, customers, currentCustomerId, onChangeTeam, userMenuChildren, logoutButton }: TopNavProps) => Promise<react_jsx_runtime.JSX.Element>;
|
|
31
32
|
|
|
32
33
|
export { type Customer as C, type TopNavLink as T, type TopNavProps as a, TopNav as b, defaultTopNavLinks as d };
|
|
@@ -22,11 +22,12 @@ interface TopNavProps {
|
|
|
22
22
|
currentCustomerId?: string;
|
|
23
23
|
onChangeTeam?: (customerId: string) => Promise<void>;
|
|
24
24
|
userMenuChildren?: ReactNode;
|
|
25
|
+
logoutButton?: ReactNode;
|
|
25
26
|
}
|
|
26
27
|
declare const defaultTopNavLinks: TopNavLink[];
|
|
27
28
|
/**
|
|
28
29
|
* TopNav renders the hero navigation bar shown on authenticated dashboards.
|
|
29
30
|
*/
|
|
30
|
-
declare const TopNav: ({ links, hiddenLabels, additionalLinks, order, userMenuLabel, activeLabel, customerName, customers, currentCustomerId, onChangeTeam, userMenuChildren }: TopNavProps) => Promise<react_jsx_runtime.JSX.Element>;
|
|
31
|
+
declare const TopNav: ({ links, hiddenLabels, additionalLinks, order, userMenuLabel, activeLabel, customerName, customers, currentCustomerId, onChangeTeam, userMenuChildren, logoutButton }: TopNavProps) => Promise<react_jsx_runtime.JSX.Element>;
|
|
31
32
|
|
|
32
33
|
export { type Customer as C, type TopNavLink as T, type TopNavProps as a, TopNav as b, defaultTopNavLinks as d };
|
package/dist/top-nav.d.mts
CHANGED
package/dist/top-nav.d.ts
CHANGED
package/dist/top-nav.js
CHANGED
|
@@ -243,7 +243,8 @@ var TopNav = async ({
|
|
|
243
243
|
customers,
|
|
244
244
|
currentCustomerId,
|
|
245
245
|
onChangeTeam,
|
|
246
|
-
userMenuChildren
|
|
246
|
+
userMenuChildren,
|
|
247
|
+
logoutButton
|
|
247
248
|
}) => {
|
|
248
249
|
const displayLabel = userMenuLabel || (customerName ? `Team: ${customerName}` : "Team: Example");
|
|
249
250
|
let logo;
|
|
@@ -392,14 +393,7 @@ var TopNav = async ({
|
|
|
392
393
|
}
|
|
393
394
|
),
|
|
394
395
|
userMenuChildren,
|
|
395
|
-
|
|
396
|
-
"a",
|
|
397
|
-
{
|
|
398
|
-
href: `${process.env.NEXT_PUBLIC_BASE_PATH || ""}/?expired=1`,
|
|
399
|
-
className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
|
|
400
|
-
children: "Logout"
|
|
401
|
-
}
|
|
402
|
-
)
|
|
396
|
+
logoutButton
|
|
403
397
|
] })
|
|
404
398
|
] })
|
|
405
399
|
] }),
|