-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathside-nav.svelte
More file actions
47 lines (44 loc) · 1.14 KB
/
side-nav.svelte
File metadata and controls
47 lines (44 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<script lang="ts">
import type { Snippet } from 'svelte';
import Navigation from '$lib/holocene/navigation/navigation-container.svelte';
import NavigationItem from '$lib/holocene/navigation/navigation-item.svelte';
import { translate } from '$lib/i18n/translate';
import type { NavLinkListItem } from '$lib/types/global';
type Props = {
isCloud: boolean;
linkList: NavLinkListItem[];
environmentName?: string;
bottomActions?: Snippet;
};
let {
isCloud = false,
linkList,
environmentName,
bottomActions,
}: Props = $props();
</script>
<Navigation
{isCloud}
{environmentName}
aria-label={translate('common.primary')}
>
{#each linkList as item}
{#if !item?.hidden}
{#if item.divider}
<hr class="-mx-4 my-4 border-subtle" />
{/if}
<NavigationItem
link={item.href}
label={item.label}
icon={item.icon}
tooltip={item?.tooltip || item.label}
external={item?.external}
animate={item?.animate}
isActive={item.isActive}
/>
{/if}
{/each}
{#snippet bottom()}
{@render bottomActions?.()}
{/snippet}
</Navigation>