diff --git a/src/lib/components/bottom-nav.svelte b/src/lib/components/bottom-nav.svelte index 33f82f7122..2cea1f4ceb 100644 --- a/src/lib/components/bottom-nav.svelte +++ b/src/lib/components/bottom-nav.svelte @@ -33,6 +33,30 @@ }, ] >; + centerButton?: Snippet< + [ + { + open: boolean; + onClick: () => void; + }, + ] + >; + menuButton?: Snippet< + [ + { + open: boolean; + onClick: () => void; + }, + ] + >; + linksContent?: Snippet< + [ + { + open: boolean; + closeMenu: () => void; + }, + ] + >; profilePicture?: Snippet; class?: ClassNameValue; } @@ -44,6 +68,9 @@ showNamespacePicker = true, children, nsPicker, + centerButton, + menuButton, + linksContent, profilePicture, class: className = '', }: Props = $props(); @@ -122,11 +149,15 @@ out:slide={{ duration: 200, delay: 0 }} > {#if viewLinks} -
- {@render linksSnippet?.()} -
+ {#if linksContent} + {@render linksContent({ open: viewLinks, closeMenu })} + {:else} +
+ {@render linksSnippet?.()} +
+ {/if} {/if} {#if nsPicker} {@render nsPicker({ open: viewNamespaces, closeMenu })} @@ -150,38 +181,49 @@ data-testid="top-nav" aria-label={translate('common.main')} > - + {/if} + {#if showNamespacePicker} + {#if centerButton} + {@render centerButton({ + open: viewNamespaces, + onClick: onNamespaceClick, + })} {:else} - +
+ +
+ +
{/if} - - {#if showNamespacePicker} -
- -
- -
{/if}