Sha256: 9ddb8af95421b6dc3d8db829cc5704b9b25539ea82336bad229c4e40ad2e6c04
Contents?: true
Size: 404 Bytes
Versions: 20
Compression:
Stored size: 404 Bytes
Contents
const hideOnEsc = { name: "hideOnEsc", defaultValue: true, fn({ hide }) { function onKeyDown(event) { if (event.keyCode === 27) { hide(); } } return { onShow() { document.addEventListener("keydown", onKeyDown); }, onHide() { document.removeEventListener("keydown", onKeyDown); }, }; }, }; export default hideOnEsc;
Version data entries
20 entries across 20 versions & 1 rubygems