react-tetris2
Version:
Classic Tetris game as a reusable React 18+ component, fully typed with TypeScript and controllable via ref.
15 lines • 557 B
TypeScript
import { default as React } from 'react';
interface DigitsProps extends React.HTMLAttributes<HTMLSpanElement> {
/** Value to display */
children: number;
/** Total digits to pad to (default = 4) */
count?: number;
}
/**
* Zero-pads a number and renders it inside a monospace `<span>`.
* All extra props (e.g. `data-testid`, `className`, `style`) are forwarded
* to the underlying element so external code and tests can target it.
*/
declare const Digits: React.FC<DigitsProps>;
export default Digits;
//# sourceMappingURL=Digits.d.ts.map