mirror of
https://github.com/hex248/tsos.git
synced 2026-02-08 10:43:39 +00:00
wider black keys and better contrast on D key
This commit is contained in:
@@ -49,8 +49,8 @@ export default function ColorKeyboard({
|
|||||||
style={
|
style={
|
||||||
isActive
|
isActive
|
||||||
? {
|
? {
|
||||||
backgroundColor: note === "E" ? "#000000" : "#ffffff",
|
backgroundColor: ["D", "E"].includes(note) ? "#000000" : "#ffffff",
|
||||||
color: note === "E" ? "#ffffff" : "#000000",
|
color: ["D", "E"].includes(note) ? "#ffffff" : "#000000",
|
||||||
}
|
}
|
||||||
: { backgroundColor: color }
|
: { backgroundColor: color }
|
||||||
}
|
}
|
||||||
@@ -64,6 +64,7 @@ export default function ColorKeyboard({
|
|||||||
{BLACK_KEYS.map((key) => {
|
{BLACK_KEYS.map((key) => {
|
||||||
const color = colorByNote[key.note];
|
const color = colorByNote[key.note];
|
||||||
const isActive = color.toLowerCase() === value.toLowerCase();
|
const isActive = color.toLowerCase() === value.toLowerCase();
|
||||||
|
const width = 10;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Toggle
|
<Toggle
|
||||||
@@ -76,8 +77,8 @@ export default function ColorKeyboard({
|
|||||||
isActive ? "" : "",
|
isActive ? "" : "",
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
width: "8%",
|
width: `${width}%`,
|
||||||
left: `${(key.position + 1) * (100 / WHITE_KEYS.length) - 4}%`,
|
left: `${(key.position + 1) * (100 / WHITE_KEYS.length) - width / 2}%`,
|
||||||
backgroundColor: color,
|
backgroundColor: color,
|
||||||
}}
|
}}
|
||||||
aria-label={`Select ${key.note}`}
|
aria-label={`Select ${key.note}`}
|
||||||
|
|||||||
Reference in New Issue
Block a user