@@ -6,6 +6,7 @@ import { AlignLeftIcon, PanelLeftCloseIcon, SearchIcon } from "lucide-react";
6
6
import { cn } from "@/lib/utils" ;
7
7
import { Button } from "@/components/core/button" ;
8
8
import { Dialog , DialogRoot } from "@/components/core/dialog" ;
9
+ import { Kbd } from "@/components/core/kbd" ;
9
10
import { ScrollArea } from "@/components/core/scroll-area" ;
10
11
import { GitHubIcon , TwitterIcon } from "@/components/icons" ;
11
12
import { siteConfig } from "@/config" ;
@@ -29,7 +30,7 @@ export const MobileNav = ({
29
30
className
30
31
) }
31
32
>
32
- < div className = "max-w-(--breakpoint-2xl) container flex h-14 w-full items-center justify-between" >
33
+ < div className = "max-w-(--breakpoint-2xl) container flex h-14 w-full items-center justify-between gap-1 sm:gap-2 " >
33
34
< DialogRoot isOpen = { isOpen } onOpenChange = { setOpen } >
34
35
< Button variant = "quiet" size = "sm" shape = "square" >
35
36
< AlignLeftIcon />
@@ -59,9 +60,9 @@ export const MobileNav = ({
59
60
< Button
60
61
prefix = { < SearchIcon /> }
61
62
variant = "outline"
62
- className = "bg-bg-inverse/5 w-full"
63
+ className = "bg-bg-inverse/5 text-fg-muted w-full"
63
64
>
64
- < span className = "flex-1 text-left" > Search </ span >
65
+ < span className = "flex-1 text-left" > Search docs... </ span >
65
66
</ Button >
66
67
</ SearchCommand >
67
68
</ div >
@@ -107,33 +108,47 @@ export const MobileNav = ({
107
108
) }
108
109
</ Dialog >
109
110
</ DialogRoot >
110
- < div className = "flex items-center gap -1" >
111
- < SearchCommand >
112
- < Button variant = "quiet" size = "sm" shape = "square" >
113
- < SearchIcon />
114
- </ Button >
115
- </ SearchCommand >
111
+ < span className = "hidden sm:block sm:flex -1" / >
112
+ < SearchCommand
113
+ onAction = { ( ) => {
114
+ setOpen ( false ) ;
115
+ } }
116
+ >
116
117
< Button
117
- href = { siteConfig . links . github }
118
- target = "_blank"
119
118
size = "sm"
120
- shape = "square"
121
- variant = "quiet"
122
- aria-label = "github"
123
- >
124
- < GitHubIcon />
125
- </ Button >
126
- < Button
127
- href = { siteConfig . links . twitter }
128
- target = "_blank"
129
- size = "sm"
130
- shape = "square"
131
- variant = "quiet"
132
- aria-label = "twitter"
119
+ variant = "outline"
120
+ prefix = { < SearchIcon /> }
121
+ suffix = {
122
+ < div className = "flex items-center gap-0.5 text-xs max-sm:hidden" >
123
+ < Kbd > Ctrl</ Kbd >
124
+ < Kbd > K</ Kbd >
125
+ </ div >
126
+ }
127
+ className = "bg-bg-inverse/5 text-fg-muted gap-2 pl-3 pr-1 max-sm:flex-1"
133
128
>
134
- < TwitterIcon / >
129
+ < span className = "mr-6 flex-1 text-left" > Search docs... </ span >
135
130
</ Button >
136
- </ div >
131
+ </ SearchCommand >
132
+ < Button
133
+ href = { siteConfig . links . github }
134
+ target = "_blank"
135
+ size = "sm"
136
+ shape = "square"
137
+ variant = "quiet"
138
+ aria-label = "github"
139
+ >
140
+ < GitHubIcon />
141
+ </ Button >
142
+ < Button
143
+ href = { siteConfig . links . twitter }
144
+ target = "_blank"
145
+ size = "sm"
146
+ shape = "square"
147
+ variant = "quiet"
148
+ aria-label = "twitter"
149
+ >
150
+ < TwitterIcon />
151
+ </ Button >
137
152
</ div >
138
153
</ header >
139
154
) ;
0 commit comments