How to use the nav-frontend-js-utils.keyCodes.esc function in nav-frontend-js-utils

To help you get started, we’ve selected a few nav-frontend-js-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-popover / src / popover.tsx View on Github external
handleKeydown = (e) => {
        if (!this.state.apen) return;
        if (e.keyCode === keyCodes.esc) this.props.onRequestClose();
        if (e.keyCode === keyCodes.tab) this.checkFocus();
    }