File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as NavigationMenu from "@radix-ui/react-navigation-menu"
4
4
5
5
import { Button } from "@/components/Buttons"
6
6
7
- import { SECTION_LABELS } from "@/lib/constants"
7
+ import { NAV_PY , SECTION_LABELS } from "@/lib/constants"
8
8
9
9
import type { NavSections } from "../types"
10
10
@@ -32,6 +32,7 @@ const Menu = ({ sections, ...props }: NavMenuProps) => {
32
32
dir = { direction }
33
33
orientation = "horizontal"
34
34
onValueChange = { handleSectionChange }
35
+ delayDuration = { 0 }
35
36
>
36
37
< NavigationMenu . List asChild >
37
38
< UnorderedList display = "flex" listStyleType = "none" m = "0" >
@@ -47,6 +48,13 @@ const Menu = ({ sections, ...props }: NavMenuProps) => {
47
48
variant = "ghost"
48
49
whiteSpace = "nowrap"
49
50
color = { isActive ? "primary.base" : "body.base" }
51
+ _after = { {
52
+ content : '""' ,
53
+ position : "absolute" ,
54
+ insetInline : 0 ,
55
+ top : "100%" ,
56
+ height : NAV_PY ,
57
+ } }
50
58
>
51
59
{ /* Animated highlight for active section */ }
52
60
{ isActive && (
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import LanguagePicker from "@/components/LanguagePicker"
22
22
import { BaseLink } from "@/components/Link"
23
23
import Search from "@/components/Search"
24
24
25
+ import { NAV_PY } from "@/lib/constants"
26
+
25
27
import Menu from "./Menu"
26
28
import MobileNavMenu from "./Mobile"
27
29
import { useNav } from "./useNav"
@@ -69,7 +71,7 @@ const Nav = () => {
69
71
borderColor = "rgba(0, 0, 0, 0.1)"
70
72
height = "4.75rem"
71
73
justifyContent = "center"
72
- py = { 4 }
74
+ py = { NAV_PY }
73
75
px = { { base : 4 , xl : 8 } }
74
76
>
75
77
< Flex
@@ -94,7 +96,7 @@ const Nav = () => {
94
96
ms = { { base : 3 , xl : 8 } }
95
97
>
96
98
< Menu hideBelow = "md" sections = { linkSections } />
97
- < Flex alignItems = "center" /* justifyContent="space-between" */ >
99
+ < Flex alignItems = "center" /* justifyContent="space-between" */ >
98
100
< Search { ...searchModalDisclosure } />
99
101
{ /* Desktop */ }
100
102
< HStack hideBelow = "md" gap = "0" >
Original file line number Diff line number Diff line change @@ -87,3 +87,5 @@ export const SECTION_LABELS: NavSectionKey[] = [
87
87
"participate" ,
88
88
"research" ,
89
89
]
90
+
91
+ export const NAV_PY = 4
You can’t perform that action at this time.
0 commit comments