Skip to content

Commit 3d2d252

Browse files
authored
Merge pull request #45 from himanshujays29/fix/leaderboard-search-responsive
fix(ui): improve leaderboard search layout
2 parents 5ddd934 + 1fc51a8 commit 3d2d252

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

components/Leaderboard/LeaderboardView.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export default function LeaderboardView({
203203
<div className="flex-1 min-w-0">
204204
{/* Header */}
205205
<div className="mb-8">
206-
<div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between mb-4">
206+
<div className="flex flex-col gap-4 md:flex-row md:items-start md:justify-between mb-4">
207207
<div className="min-w-0">
208208
<h1 className="text-4xl text-[#50B78B] font-bold mb-2">
209209
{periodLabels[period]} Leaderboard
@@ -218,16 +218,17 @@ export default function LeaderboardView({
218218
<div className="flex flex-col gap-2 w-full sm:w-auto sm:flex-row sm:items-center sm:justify-end">
219219

220220
{/* Search Bar */}
221-
<div className="relative w-full sm:w-auto sm:min-w-[16rem]">
221+
<div className="relative w-full sm:flex-1 sm:min-w-0 md:w-[16rem]">
222222
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
223223
<Input
224224
type="text"
225225
placeholder="Search contributors..."
226226
value={searchQuery}
227227
onChange={(e) => setSearchQuery(e.target.value)}
228-
className="
229-
pl-9 h-9 w-full sm:w-64 bg-white dark:bg-[#07170f] border border-[#50B78B]/60 dark:border-[#50B78B]/40 text-foreground dark:text-foreground shadow-sm dark:shadow-none outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#50B78B] focus-visible:ring-offset-0 transition-colors
230-
"
228+
className={cn(
229+
"pl-9 h-9 w-full bg-white dark:bg-[#07170f] border border-[#50B78B]/60 dark:border-[#50B78B]/40 text-foreground dark:text-foreground shadow-sm dark:shadow-none outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#50B78B] focus-visible:ring-offset-0 transition-colors",
230+
"sm:w-full"
231+
)}
231232
/>
232233
</div>
233234

0 commit comments

Comments
 (0)