Skip to content

Commit 1e9c56f

Browse files
authored
fixed ui responsiveness on project page (#2877)
1 parent 70c1bbe commit 1e9c56f

File tree

1 file changed

+9
-6
lines changed
  • apps/web/client/src/app/projects/_components

1 file changed

+9
-6
lines changed

apps/web/client/src/app/projects/_components/top-bar.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,21 @@ export const TopBar = ({ searchQuery, onSearchChange }: TopBarProps) => {
165165
};
166166

167167
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">
169169
<Link href={Routes.HOME} className="flex items-center justify-start mt-0 py-3">
170170
<Icons.OnlookTextLogo className="w-24" viewBox="0 0 139 17" />
171171
</Link>
172172

173173
{typeof onSearchChange === 'function' ? (
174-
<div className="flex-1 flex justify-center">
174+
<div className="flex-1 flex justify-center min-w-0">
175175
<motion.div
176176
ref={searchContainerRef}
177-
className="relative"
177+
className="relative w-full hidden sm:block"
178178
initial={false}
179-
animate={isSearchFocused ? { width: 360 } : { width: 260 }}
179+
animate={isSearchFocused ?
180+
{ width: '100%', maxWidth: '360px' } :
181+
{ width: '100%', maxWidth: '260px' }
182+
}
180183
transition={{ duration: 0.25, ease: [0.25, 0.46, 0.45, 0.94] }}
181184
>
182185
<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) => {
186189
onChange={(e) => onSearchChange?.(e.currentTarget.value)}
187190
onFocus={() => setIsSearchFocused(true)}
188191
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"
190193
/>
191194
{searchQuery && (
192195
<button
@@ -268,4 +271,4 @@ export const TopBar = ({ searchQuery, onSearchChange }: TopBarProps) => {
268271
</div>
269272
</div>
270273
);
271-
};
274+
};

0 commit comments

Comments
 (0)