nes-tetris-components
Version:
A set of components and front-end functionality of NES Tetris
18 lines (17 loc) • 678 B
TypeScript
import React, { MouseEvent } from 'react';
import './representation.css';
export interface BlockProps {
row: number;
column: number;
value: number;
width?: string;
disabled?: boolean;
nearInvisible?: boolean;
slightlyHidden?: boolean;
transparent?: boolean;
showDiff?: boolean;
onMouseEnter?: (event: MouseEvent) => void;
onWheel?: (event: React.UIEvent<HTMLDivElement, UIEvent>) => void;
onClick?: (event: MouseEvent) => void;
}
export default function Block({ value, nearInvisible, slightlyHidden, transparent, showDiff, row, column, onMouseEnter, onWheel, onClick, disabled, width }: BlockProps): JSX.Element;