Skip to content

Commit

Permalink
Add outline rings for ArrowLight component to improve visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cdonohue committed Jan 15, 2024
1 parent fefffbd commit 790f0e4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions components/TrafficLight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,23 @@ function ArrowLight({ state }: ArrowLightProps) {
? 'text-red-500'
: state === 'yield'
? 'text-orange-500'
: 'text-zinc'
: 'text-zinc-600'

const ringColor =
state === 'go'
? 'ring-green-500'
: state === 'caution'
? 'ring-yellow-500'
: state === 'stop'
? 'ring-red-500'
: state === 'yield'
? 'ring-orange-500'
: 'ring-zinc-600'

return (
<div className="w-8 h-8 rounded-full flex items-center justify-center bg-zinc-800">
<div
className={`w-8 h-8 rounded-full flex items-center justify-center bg-zinc-800 ring-2 ring-inset ${ringColor}`}
>
<ArrowLeftIcon
className={`w-6 h-6 ${color} ${
state === 'yield' ? 'animation-blink' : ''
Expand Down

0 comments on commit 790f0e4

Please sign in to comment.