mycrossword
Version:
React crossword component
28 lines (27 loc) • 934 B
TypeScript
import { CellFocus, CellPosition, Char } from '~/types';
import * as React from 'react';
export declare const getDimensions: (cellSize: number, cellPos: CellPosition) => {
xRect: number;
yRect: number;
xNum: number;
yNum: number;
xText: number;
yText: number;
};
interface GridCellProps {
cellSize: number;
clueIds: string[];
guess?: Char;
inputRef?: React.RefObject<HTMLInputElement>;
highlighted: boolean;
selected: boolean;
num?: number;
onCellFocus?: (cellFocus: CellFocus) => void;
pos: CellPosition;
selectedClueIndex: number;
checked?: boolean;
val?: Char;
}
declare function GridCell({ cellSize, clueIds, guess, inputRef, highlighted, selected, num, onCellFocus, pos, selectedClueIndex, checked, val, }: GridCellProps): import("react/jsx-runtime").JSX.Element;
declare const _default: React.MemoExoticComponent<typeof GridCell>;
export default _default;