Skip to content

Commit 9662e1d

Browse files
style: improve move tooltip to stand out more
1 parent a920f6d commit 9662e1d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/components/Analysis/MoveTooltip.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const MoveTooltip: React.FC<MoveTooltipProps> = ({
2929

3030
return (
3131
<div
32-
className="pointer-events-none fixed z-50 rounded border border-background-2 bg-backdrop shadow-lg"
32+
className="pointer-events-none fixed z-50 flex w-auto min-w-[12rem] flex-col overflow-hidden rounded-lg border border-white/30 bg-background-1 backdrop-blur-sm"
3333
style={{
3434
left: position.x + 15,
3535
top: position.y - 10,
@@ -38,26 +38,26 @@ export const MoveTooltip: React.FC<MoveTooltipProps> = ({
3838
}}
3939
>
4040
{/* Header */}
41-
<div className="flex items-center bg-backdrop px-3 py-1.5">
41+
<div className="flex w-full justify-between border-b border-white/20 bg-gradient-to-r from-background-2/90 to-background-2/70 px-3 py-1.5">
4242
<span style={{ color }} className="font-medium">
4343
{san}
4444
</span>
4545
</div>
4646

4747
{/* Content */}
48-
<div className="flex flex-col items-start justify-start gap-1 bg-background-1/80 px-3 py-1.5 text-sm">
48+
<div className="flex flex-col items-start justify-start gap-1 bg-gradient-to-b from-background-1 to-background-1/90 px-3 py-1.5 text-sm">
4949
{/* Maia Probability */}
5050
{maiaProb !== undefined && (
5151
<div className="flex w-full items-center justify-between gap-2 font-mono">
52-
<span className="text-human-3">Maia:</span>
52+
<span className="font-medium text-human-2">Maia:</span>
5353
<span>{(Math.round(maiaProb * 1000) / 10).toFixed(1)}%</span>
5454
</div>
5555
)}
5656

5757
{/* Stockfish Evaluation */}
5858
{stockfishCp !== undefined && (
5959
<div className="flex w-full items-center justify-between gap-2 font-mono">
60-
<span className="text-engine-3">SF Eval:</span>
60+
<span className="font-medium text-engine-2">SF Eval:</span>
6161
<span>
6262
{stockfishCp > 0 ? '+' : ''}
6363
{(stockfishCp / 100).toFixed(2)}
@@ -68,15 +68,15 @@ export const MoveTooltip: React.FC<MoveTooltipProps> = ({
6868
{/* Stockfish Win Rate */}
6969
{stockfishWinrate !== undefined && (
7070
<div className="flex w-full items-center justify-between gap-2 font-mono">
71-
<span className="text-engine-3">SF Winrate:</span>
71+
<span className="font-medium text-engine-2">SF Winrate:</span>
7272
<span>{(stockfishWinrate * 100).toFixed(1)}%</span>
7373
</div>
7474
)}
7575

7676
{/* Stockfish Loss */}
7777
{stockfishLoss !== undefined && (
7878
<div className="flex w-full items-center justify-between gap-2 font-mono">
79-
<span className="text-engine-3">SF Loss:</span>
79+
<span className="font-medium text-engine-2">SF Loss:</span>
8080
<span>
8181
{stockfishLoss > 0 ? '+' : ''}
8282
{stockfishLoss.toFixed(2)}

0 commit comments

Comments
 (0)