diff --git a/deno.json b/deno.json index 6010b88..d48f234 100644 --- a/deno.json +++ b/deno.json @@ -43,5 +43,5 @@ "jsx": "react-jsx", "jsxImportSource": "preact" }, - "nodeModulesDir": true + "nodeModulesDir": "auto" } diff --git a/islands/theme-toggle.tsx b/islands/theme-toggle.tsx index f866378..4ddac64 100644 --- a/islands/theme-toggle.tsx +++ b/islands/theme-toggle.tsx @@ -1,17 +1,23 @@ -import { useSignal } from "@preact/signals"; +import { signal } from "@preact/signals"; import { Button } from "../components/ui/Button.tsx"; import { Icons } from "../components/icons.tsx"; -export function ThemeToggle() { - const theme = useSignal("light"); +export const theme = signal("dark"); +export function ThemeToggle() { return (