@@ -165,18 +165,21 @@ export const TopBar = ({ searchQuery, onSearchChange }: TopBarProps) => {
165
165
} ;
166
166
167
167
return (
168
- < div className = "w-full max-w-6xl mx-auto flex items-center justify-between p-4 px-0 text-small text-foreground-secondary gap-6" >
168
+ < div className = "w-full max-w-6xl mx-auto flex items-center justify-between p-4 text-small text-foreground-secondary gap-6" >
169
169
< Link href = { Routes . HOME } className = "flex items-center justify-start mt-0 py-3" >
170
170
< Icons . OnlookTextLogo className = "w-24" viewBox = "0 0 139 17" />
171
171
</ Link >
172
172
173
173
{ typeof onSearchChange === 'function' ? (
174
- < div className = "flex-1 flex justify-center" >
174
+ < div className = "flex-1 flex justify-center min-w-0 " >
175
175
< motion . div
176
176
ref = { searchContainerRef }
177
- className = "relative"
177
+ className = "relative w-full hidden sm:block "
178
178
initial = { false }
179
- animate = { isSearchFocused ? { width : 360 } : { width : 260 } }
179
+ animate = { isSearchFocused ?
180
+ { width : '100%' , maxWidth : '360px' } :
181
+ { width : '100%' , maxWidth : '260px' }
182
+ }
180
183
transition = { { duration : 0.25 , ease : [ 0.25 , 0.46 , 0.45 , 0.94 ] } }
181
184
>
182
185
< Icons . MagnifyingGlass className = "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-foreground-tertiary z-10" />
@@ -186,7 +189,7 @@ export const TopBar = ({ searchQuery, onSearchChange }: TopBarProps) => {
186
189
onChange = { ( e ) => onSearchChange ?.( e . currentTarget . value ) }
187
190
onFocus = { ( ) => setIsSearchFocused ( true ) }
188
191
placeholder = "Search projects"
189
- className = "pl-9 pr-7 focus-visible:border-transparent focus-visible:ring-0"
192
+ className = "pl-9 pr-7 focus-visible:border-transparent focus-visible:ring-0 w-full "
190
193
/>
191
194
{ searchQuery && (
192
195
< button
@@ -268,4 +271,4 @@ export const TopBar = ({ searchQuery, onSearchChange }: TopBarProps) => {
268
271
</ div >
269
272
</ div >
270
273
) ;
271
- } ;
274
+ } ;
0 commit comments