Skip to content

Commit 183e18f

Browse files
committed
fix(ui): apply dark theme on leaderboard
1 parent 01cf919 commit 183e18f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/components/Benchmarks/BenchmarkDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const BenchmarkDetail = ({
166166
</button>
167167
</div>
168168
</Transition.Child>
169-
<div className="h-full flex flex-col py-6 bg-white shadow-xl overflow-hidden">
169+
<div className="h-full flex flex-col py-6 bg-white dark:bg-gray-600 shadow-xl overflow-hidden">
170170
<div className="relative flex-1 px-4 sm:px-6">
171171
<Leaderboard
172172
benchmarkId={benchmarkData?.id ? benchmarkData.id : ''}

src/components/leaderboard/Leaderboard.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
4848
return (
4949
<div className="mt-3 ml-2 flex-1">
5050
<div className="flex justify-between">
51-
<h1 className="text-2xl pb-3 ">Leaderboard</h1>
51+
<h1 className="text-2xl pb-3 dark:text-white ">Leaderboard</h1>
5252
<div>
5353
<Listbox value={selected} onChange={setSelected}>
5454
{({ open }) => (
@@ -149,30 +149,30 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
149149
<div className="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
150150
<div className="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
151151
<table className=" divide-y divide-gray-200">
152-
<thead className="bg-gray-50">
152+
<thead className="bg-gray-50 dark:bg-gray-800">
153153
<tr>
154154
<th
155155
scope="col"
156-
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
156+
className="dark:text-white px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
157157
>
158158
Rank
159159
</th>
160160
<th
161161
scope="col"
162-
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
162+
className="dark:text-white px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
163163
>
164164
Name
165165
</th>
166166
<th
167167
scope="col"
168-
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
168+
className="dark:text-white px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
169169
>
170170
Date / Language
171171
</th>
172172

173173
<th
174174
scope="col"
175-
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
175+
className="dark:text-white px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
176176
onClick={() => setSortedField('qualityScore')}
177177
>
178178
<div className="flex">
@@ -186,7 +186,7 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
186186
</th>
187187
<th
188188
scope="col"
189-
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
189+
className="dark:text-white px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
190190
onClick={() => setSortedField('lintScore')}
191191
>
192192
<div className="flex">
@@ -200,7 +200,7 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
200200
</th>
201201
<th
202202
scope="col"
203-
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
203+
className="dark:text-white px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
204204
onClick={() => setSortedField('lintScore')}
205205
>
206206
<div className="flex">
@@ -214,7 +214,7 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
214214
</th>
215215
<th
216216
scope="col"
217-
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
217+
className="dark:text-white px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
218218
onClick={() => setSortedField('lintScore')}
219219
>
220220
<div className="flex">
@@ -228,7 +228,7 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
228228
</th>
229229
</tr>
230230
</thead>
231-
<tbody className="bg-white divide-y divide-gray-200 ">
231+
<tbody className="bg-white dark:bg-gray-300 divide-y divide-gray-200 ">
232232
{leaderboard
233233
? leaderboard
234234
.filter(

0 commit comments

Comments
 (0)