Skip to content

Commit a1d295a

Browse files
fix: change clock colour based on turn to play
1 parent 4e22f6e commit a1d295a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/components/Common/PlayerInfo.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,15 @@ export const PlayerInfo: React.FC<PlayerInfoProps> = ({
8484
</div>
8585
)}
8686
{clock && (
87-
<div className="flex items-center bg-primary px-2 py-0.5">
87+
<div
88+
className={`flex items-center px-2 py-1 ${
89+
clock.isActive ? 'bg-primary' : 'bg-background-2'
90+
}`}
91+
>
8892
<span
8993
className={`font-mono text-xs font-medium ${
90-
clock.isActive ? 'text-black' : 'text-black/60'
91-
} ${currentTime < 60 ? 'text-red-700' : ''}`}
94+
clock.isActive ? 'text-black' : 'text-secondary/80'
95+
} ${currentTime < 60 && clock.isActive ? 'text-red-700' : ''}`}
9296
>
9397
{formatTime(currentTime)}
9498
</span>

0 commit comments

Comments
 (0)