UNPKG

@benev/nubs

Version:
16 lines 617 B
import { KeycapView } from "../views/keycap.js"; export function renderKeycap({ waiting, currentlyWaitingForThisEffect, onClickRebind, }) { return (code, keyIndex) => KeycapView({ keyIndex, code: code.length ? code.join(" ") : "-", isWaiting: (currentlyWaitingForThisEffect && (waiting === null || waiting === void 0 ? void 0 : waiting.keyIndex) === keyIndex), onClickRebind(event) { if (!waiting) { event.preventDefault(); onClickRebind(keyIndex); } }, }); } //# sourceMappingURL=render-keycap.js.map