feat : useScreenSize for board size
This commit is contained in:
@@ -6,14 +6,19 @@ import { Chess } from "chess.js";
|
||||
interface Props {
|
||||
setGame?: (game: Chess) => void;
|
||||
label?: string;
|
||||
size?: "small" | "medium" | "large";
|
||||
}
|
||||
|
||||
export default function LoadGameButton({ setGame, label }: Props) {
|
||||
export default function LoadGameButton({ setGame, label, size }: Props) {
|
||||
const [openDialog, setOpenDialog] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button variant="contained" onClick={() => setOpenDialog(true)}>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={() => setOpenDialog(true)}
|
||||
size={size}
|
||||
>
|
||||
{label || "Add game"}
|
||||
</Button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user