feat : add arrow opt out options

This commit is contained in:
GuillaumeSD
2024-02-24 18:20:48 +01:00
parent 035591208f
commit 7b328d3159
16 changed files with 228 additions and 89 deletions

View File

@@ -1,5 +1,5 @@
import { Icon } from "@iconify/react";
import { IconButton } from "@mui/material";
import { Grid, IconButton, Tooltip } from "@mui/material";
import { useAtomValue } from "jotai";
import { boardAtom, gameAtom } from "../states";
import { useChessActions } from "@/hooks/useChess";
@@ -32,11 +32,15 @@ export default function NextMoveButton() {
};
return (
<IconButton
onClick={() => addNextGameMoveToBoard()}
disabled={!isButtonEnabled}
>
<Icon icon="ri:arrow-right-s-line" height={30} />
</IconButton>
<Tooltip title="Go to next move">
<Grid>
<IconButton
onClick={() => addNextGameMoveToBoard()}
disabled={!isButtonEnabled}
>
<Icon icon="ri:arrow-right-s-line" height={30} />
</IconButton>
</Grid>
</Tooltip>
);
}