feat : add game panel info

This commit is contained in:
GuillaumeSD
2024-02-24 16:32:22 +01:00
parent 6156e4a228
commit 035591208f
17 changed files with 290 additions and 73 deletions

View File

@@ -5,15 +5,16 @@ import { Chess } from "chess.js";
interface Props {
setGame?: (game: Chess) => void;
label?: string;
}
export default function LoadGameButton({ setGame }: Props) {
export default function LoadGameButton({ setGame, label }: Props) {
const [openDialog, setOpenDialog] = useState(false);
return (
<>
<Button variant="contained" onClick={() => setOpenDialog(true)}>
Add game
{label || "Add game"}
</Button>
<NewGameDialog