Color selection test working
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
63a41723be
commit
b8195b6b8b
@ -85,6 +85,18 @@
|
||||
}
|
||||
|
||||
.Selected {
|
||||
background-color: rgba(255, 238, 0, 0.5);
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 5px 5px 5px black;
|
||||
}
|
||||
.Selected[data-color='R'] {
|
||||
background-color: rgba(255, 0, 0, 0.5);
|
||||
}
|
||||
.Selected[data-color='O'] {
|
||||
background-color: rgba(255, 196, 0, 0.5);
|
||||
}
|
||||
.Selected[data-color='W'] {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.Selected[data-color='B'] {
|
||||
background-color: rgba(0, 0, 255, 0.5);
|
||||
}
|
@ -41,6 +41,7 @@ const Board = ({ game }) => {
|
||||
el.classList.remove('Selected');
|
||||
}
|
||||
}
|
||||
event.target.setAttribute("data-color", game.color);
|
||||
event.target.classList.toggle('Selected');
|
||||
};
|
||||
return <div className="Road"
|
||||
@ -64,6 +65,7 @@ const Board = ({ game }) => {
|
||||
}
|
||||
}
|
||||
event.target.classList.toggle('Selected');
|
||||
event.target.setAttribute("data-color", game.color);
|
||||
};
|
||||
return <div className="Corner"
|
||||
onClick={onClick}
|
||||
|
Loading…
x
Reference in New Issue
Block a user