Everything except Gang is Muified

This commit is contained in:
Olivier Gagnon
2021-10-01 13:36:59 -04:00
parent 4e8bb96f3f
commit 3187bb990d
10 changed files with 146 additions and 194 deletions
+7 -6
View File
@@ -1,9 +1,10 @@
import React from "react";
import React, { useState, useEffect } from "react";
export function BlinkingCursor(): React.ReactElement {
return (
<span style={{ fontSize: "1em" }} className={"blinking-cursor"}>
|
</span>
);
const [on, setOn] = useState(true);
useEffect(() => {
const i = setInterval(() => setOn((old) => !old), 1000);
return () => clearInterval(i);
});
return <>{on ? "|" : ""}</>;
}
+3 -2
View File
@@ -1,5 +1,6 @@
import React, { useState } from "react";
import Grid from "@mui/material/Grid";
import Typography from "@mui/material/Typography";
import { IMinigameProps } from "./IMinigameProps";
import { KeyHandler } from "./KeyHandler";
import { GameTimer } from "./GameTimer";
@@ -93,9 +94,9 @@ export function WireCuttingGame(props: IMinigameProps): React.ReactElement {
<Grid container spacing={3}>
<GameTimer millis={timer} onExpire={props.onFailure} />
<Grid item xs={12}>
<h1 className={"noselect"}>Cut the wires with the following properties! (keyboard 1 to 9)</h1>
<Typography variant="h4">Cut the wires with the following properties! (keyboard 1 to 9)</Typography>
{questions.map((question, i) => (
<h3 key={i}>{question.toString()}</h3>
<Typography key={i}>{question.toString()}</Typography>
))}
<pre>
{new Array(wires.length).fill(0).map((_, i) => (