Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | <script lang="ts">
import type { NavItemProps, NavLinkType } from "./types";
import NavLink from "./NavLink.svelte";
import NavMenu from "./NavMenu.svelte";
type $$Props = NavItemProps;
export let id = "";
export let link: string | undefined = undefined;
export let current = false;
export let columns = 0;
export let children: NavLinkType[] = [];
export let expanded = false;
</script>
{#if children.length > 0}
<NavMenu {id} {current} {children} {columns} {expanded} on:toggle on:close><slot /></NavMenu>
{:else}
<NavLink href={link} {current}><slot /></NavLink>
{/if}
|