import type { EntryMode } from "../state/session"; import { symbolFor } from "../state/session"; import { colorMarkDescription } from "../state/uiPreferences"; const modes: Array<{ mode: EntryMode; label: string; key: string }> = [ { mode: "value", label: "Value", key: "Z" }, { mode: "corner", label: "Corner", key: "X" }, { mode: "center", label: "Centre", key: "C" }, { mode: "color", label: "Colour", key: "V" }, ]; export function NumberPad({ size, mode, onMode, onValue, onErase, }: { size: number; mode: EntryMode; onMode: (mode: EntryMode) => void; onValue: (value: number) => void; onErase: () => void; }) { return (
{modes.map((item) => ( ))}
9 ? " digit-pad--wide" : ""}`} role="group" aria-label={mode === "color" ? "Colours" : "Digits"} > {Array.from({ length: mode === "color" ? 8 : size }, (_, index) => { const value = index + 1; return ( ); })}
); }