Skip to content

Commit b97300b

Browse files
committed
Improve dark mode
1 parent 4373c74 commit b97300b

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

assets/js/dashboard/extra/exploration.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function PathConnectors({ scrollRef, steps }) {
253253
d={d}
254254
fill="none"
255255
clipPath="url(#exploration-list-clip)"
256-
className="stroke-indigo-500 dark:stroke-gray-500"
256+
className="stroke-indigo-500 dark:stroke-indigo-400"
257257
strokeWidth="1.5"
258258
/>
259259
))}
@@ -297,9 +297,9 @@ function ExplorationColumn({
297297
return (
298298
<div
299299
data-exploration-column={colIndex}
300-
className="min-w-80 flex-1 bg-gray-50 dark:bg-gray-800 rounded-lg overflow-hidden"
300+
className="min-w-80 flex-1 bg-gray-50 dark:bg-gray-850 rounded-lg overflow-hidden"
301301
>
302-
<div className="h-[42px] pt-2 pl-4 pr-1.5 flex items-center justify-between">
302+
<div className="h-[42px] py-2 pl-4 pr-1.5 flex items-center justify-between">
303303
{onDirectionChange ? (
304304
<DirectionDropdown
305305
direction={direction}
@@ -340,7 +340,7 @@ function ExplorationColumn({
340340
) : (
341341
<ul
342342
data-exploration-list
343-
className="flex flex-col gap-y-2 p-2 h-110 overflow-y-auto [scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent]"
343+
className="flex flex-col gap-y-2 px-2 pb-2 h-110 overflow-y-auto [scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent]"
344344
>
345345
{listItems.map(({ step, visitors }) => {
346346
const isSelected = !!selected && isSameStep(step, selected)
@@ -362,7 +362,7 @@ function ExplorationColumn({
362362
data-exploration-step={isSelected ? colIndex : undefined}
363363
className={`group w-full border text-left px-4 py-3 text-sm rounded-md focus:outline-none ${
364364
isSelected
365-
? 'bg-indigo-50 dark:bg-gray-700 border-indigo-100 dark:border-transparent'
365+
? 'bg-indigo-50 dark:bg-gray-600/70 border-indigo-100 dark:border-transparent'
366366
: 'bg-white dark:bg-gray-750 border-gray-150 dark:border-gray-750'
367367
}`}
368368
onClick={() => onSelect(isSelected ? null : step)}
@@ -383,13 +383,13 @@ function ExplorationColumn({
383383
{isCustomEvent && (
384384
<CursorIcon
385385
title="Custom event"
386-
className={`size-4 shrink-0 ${isDimmed ? 'text-gray-300 dark:text-gray-600' : 'text-gray-500 dark:text-gray-400'}`}
386+
className={`size-4 shrink-0 ${isDimmed ? 'text-gray-300 dark:text-gray-600' : 'text-gray-900 dark:text-gray-100'}`}
387387
/>
388388
)}
389389
<span className="truncate">{label}</span>
390390
{step.includes_subpaths && (
391391
<>
392-
<ChevronRightIcon className="mt-0.5 size-3 shrink-0 text-gray-400 dark:text-gray-500" />
392+
<ChevronRightIcon className={`mt-0.5 size-3 shrink-0 ${isDimmed ? 'text-gray-400 dark:text-gray-500' : 'text-gray-500 dark:text-gray-400'}`} />
393393
<span
394394
className={`shrink-0 ${isDimmed ? 'text-gray-400 dark:text-gray-500' : 'text-gray-500 dark:text-gray-400'}`}
395395
>
@@ -416,17 +416,19 @@ function ExplorationColumn({
416416
<div
417417
className={`h-1 rounded-full overflow-hidden ${
418418
isSelected
419-
? 'bg-indigo-200/70 dark:bg-gray-700'
420-
: 'bg-gray-150 dark:bg-gray-700/50'
419+
? 'bg-indigo-200/70 dark:bg-gray-500/60'
420+
: isDimmed
421+
? 'bg-gray-150 dark:bg-gray-700'
422+
: 'bg-gray-150 dark:bg-gray-600'
421423
}`}
422424
>
423425
<div
424426
className={`h-full rounded-full transition-[width] ease-in-out ${
425427
isSelected
426-
? 'bg-indigo-500 dark:bg-white'
428+
? 'bg-indigo-500 dark:bg-indigo-400'
427429
: isDimmed
428-
? 'bg-indigo-200 dark:bg-gray-600'
429-
: 'bg-indigo-300 dark:bg-gray-500 group-hover:bg-indigo-400 dark:group-hover:bg-white'
430+
? 'bg-indigo-200 dark:bg-indigo-400/30'
431+
: 'bg-indigo-300 dark:bg-indigo-400/75 group-hover:bg-indigo-400 dark:group-hover:bg-indigo-400'
430432
}`}
431433
style={{ width: `${barWidth}%` }}
432434
/>

0 commit comments

Comments
 (0)