Front: Typecheck

This commit is contained in:
Arthur Jamet
2023-09-30 11:05:08 +02:00
parent 1c17ac8b13
commit 76d70f3edd
18 changed files with 110 additions and 105 deletions
+3 -1
View File
@@ -79,6 +79,7 @@ const Octave = (props: OctaveProps) => {
bgHovered={isHighlighted ? highlightColor : whiteKeyBgHovered}
onKeyDown={() => onNoteDown(key)}
onKeyUp={() => onNoteUp(key)}
// @ts-expect-error Raw CSS
style={{
width: whiteKeyWidthExpr,
height: whiteKeyHeightExpr,
@@ -100,6 +101,7 @@ const Octave = (props: OctaveProps) => {
bgHovered={isHighlighted ? highlightColor : blackKeyBgHovered}
onKeyDown={() => onNoteDown(key)}
onKeyUp={() => onNoteUp(key)}
// @ts-expect-error Raw CSS
style={{
width: blackKeyWidthExpr,
height: blackKeyHeightExpr,
@@ -107,7 +109,7 @@ const Octave = (props: OctaveProps) => {
left: `calc(calc(${whiteKeyWidthExpr} * ${
i + ((i > 1) as unknown as number) + 1
}) - calc(${blackKeyWidthExpr} / 2))`,
top: '0px',
top: 0,
}}
text={{
color: 'white',
@@ -43,6 +43,7 @@ const VirtualPiano = ({
{octaveList.map((octaveNum) => {
return (
<Octave
// @ts-expect-error Raw CSS
style={{ width: octaveWidthExpr, height: '100%' }}
key={octaveNum}
number={octaveNum}