| 100 | } |
| 101 | |
| 102 | function NavigationMenuViewport({ |
| 103 | className, |
| 104 | ...props |
| 105 | }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) { |
| 106 | return ( |
| 107 | <div |
| 108 | className={cn( |
| 109 | "absolute top-full left-0 isolate z-50 flex justify-center" |
| 110 | )} |
| 111 | > |
| 112 | <NavigationMenuPrimitive.Viewport |
| 113 | data-slot="navigation-menu-viewport" |
| 114 | className={cn( |
| 115 | "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]", |
| 116 | className |
| 117 | )} |
| 118 | {...props} |
| 119 | /> |
| 120 | </div> |
| 121 | ) |
| 122 | } |
| 123 | |
| 124 | function NavigationMenuLink({ |
| 125 | className, |