Refactor ThemeProvider to use React instead of Preact for improved compatibility

This commit is contained in:
ecwu
2024-12-25 14:43:28 +08:00
parent 756bf6cddd
commit 126fa4f9db

View File

@@ -1,10 +1,9 @@
import { createContext } from "preact";
import { useContext, useEffect, useState } from "preact/hooks";
import { createContext, useContext, useEffect, useState } from "react";
type Theme = "dark" | "light" | "system";
type ThemeProviderProps = {
children: preact.VNode;
children: React.ReactNode;
defaultTheme?: Theme;
storageKey?: string;
};