fix: make it work with new vite
This commit is contained in:
@@ -4,7 +4,6 @@ import { useEventListener } from "@lib/hooks/useEventListener.ts";
|
||||
import { menus } from "@islands/KMenu/commands.ts";
|
||||
import { MenuEntry } from "@islands/KMenu/types.ts";
|
||||
import * as icons from "@components/icons.tsx";
|
||||
import { IS_BROWSER } from "fresh/runtime";
|
||||
import { isKMenuOpen } from "@lib/kmenu.ts";
|
||||
const KMenuEntry = (
|
||||
{ entry, activeIndex, index }: {
|
||||
@@ -155,17 +154,17 @@ export const KMenu = (
|
||||
} else {
|
||||
input.current?.blur();
|
||||
}
|
||||
}, IS_BROWSER ? document?.body : undefined);
|
||||
}, typeof document !== "undefined" ? document?.body : undefined);
|
||||
|
||||
return (
|
||||
<div
|
||||
class={`${visible.value ? "opacity-100" : "opacity-0"} pointer-events-${
|
||||
visible.value ? "auto" : "none"
|
||||
class={`${visible.value ? "opacity-100" : "opacity-0"} ${
|
||||
visible.value ? "pointer-events-auto" : "pointer-events-none"
|
||||
} transition grid place-items-center w-full h-full fixed top-0 left-0 z-50`}
|
||||
style={{ background: "#141217ee" }}
|
||||
>
|
||||
<div
|
||||
class={`relative w-1/2 max-h-64 max-w-[400px] rounded-2xl shadow-2xl nnoisy-gradient overflow-hidden after:opacity-10 bg-gray-700`}
|
||||
class={`relative w-1/2 max-h-64 max-w-100 rounded-2xl shadow-2xl nnoisy-gradient overflow-hidden after:opacity-10 bg-gray-700`}
|
||||
style={{ background: "#2B2930", color: "#818181" }}
|
||||
>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user