UNPKG

onix-chess-game

Version:
30 lines (29 loc) 983 B
import * as React from 'react'; import { Chess as ChessGame, IChessOpening, Move } from 'onix-chess'; import { NavigatorMode } from './Constants'; export interface DumbMoveListProps { nav: NavigatorMode; game: ChessGame; opeinig?: IChessOpening; startPly: number; currentMove: Move; onChangePos: (move: Move) => void; onChangeKey: (move: string) => void; } export declare class DumbMoveList extends React.Component<DumbMoveListProps, {}> { private activeMove?; private scrollerRef; /** * constructor */ constructor(props: DumbMoveListProps); componentDidUpdate(prevProps: DumbMoveListProps): void; ensureActiveItemVisible(): void; scrollElementIntoViewIfNeeded(domNode: HTMLElement | null, parent: HTMLElement | null): void; private renderNav; onMoveClick: (e: React.MouseEvent<HTMLSpanElement>) => void; private renderMoveNo; private renderMove; private renderMoves; render(): JSX.Element; }