@@ -28,7 +28,7 @@ The mega menu component is a full-width dropdown that can be triggered by clicki
28
28
Use this example to show a list of links aligned on three columns inside the mega menu dropdown.
29
29
30
30
``` svelte example class="h-[30rem] md:h-80"
31
- <script>
31
+ <script lang="ts" >
32
32
import { Navbar, NavBrand, NavHamburger, NavUl, NavLi, MegaMenu } from "flowbite-svelte";
33
33
import { ChevronDownOutline } from "flowbite-svelte-icons";
34
34
let menu = [
@@ -58,7 +58,7 @@ Use this example to show a list of links aligned on three columns inside the meg
58
58
<NavLi class="cursor-pointer" onclick={() => (open = true)}>
59
59
Mega menu<ChevronDownOutline class="text-primary-800 ms-2 inline h-6 w-6 dark:text-white" />
60
60
</NavLi>
61
- <MegaMenu items={menu} bind:open >
61
+ <MegaMenu items={menu}>
62
62
{#snippet children({ item })}
63
63
<a href={item.href} class="hover:text-primary-600 dark:hover:text-primary-500">{item.name}</a>
64
64
{/snippet}
@@ -75,9 +75,9 @@ Use this example to show a list of links aligned on three columns inside the meg
75
75
This example of a mega menu dropdown can be used to also show an icon near the text of the link.
76
76
77
77
``` svelte example class="h-[30rem] md:h-80"
78
- <script>
78
+ <script lang="ts" >
79
79
import { Navbar, NavBrand, NavHamburger, NavUl, NavLi, MegaMenu } from "flowbite-svelte";
80
- import { IconOutline, ChevronDownOutline, UserCircleOutline } from "flowbite-svelte-icons";
80
+ import { ChevronDownOutline, UserCircleOutline } from "flowbite-svelte-icons";
81
81
let menu = [
82
82
{ name: "About us", href: "/about", icon: UserCircleOutline },
83
83
{ name: "Blog", href: "/blog", icon: UserCircleOutline },
0 commit comments