@inkline/inkline
Version:
Inkline is the intuitive UI Components library that gives you a developer-friendly foundation for building high-quality, accessible, and customizable Vue.js 3 Design Systems.
14 lines (13 loc) • 355 B
JavaScript
import { isKey } from "@grozav/utils";
import { OverlayController } from "@inkline/inkline/controllers";
export const OverlayPlugin = {
install: () => {
if (typeof window !== "undefined") {
window.addEventListener("keydown", (e) => {
if (isKey("esc", e)) {
OverlayController.onPressEscape();
}
});
}
}
};