Refactor ThemeProvider to use React instead of Preact for improved compatibility
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import { createContext } from "preact";
|
import { createContext, useContext, useEffect, useState } from "react";
|
||||||
import { useContext, useEffect, useState } from "preact/hooks";
|
|
||||||
|
|
||||||
type Theme = "dark" | "light" | "system";
|
type Theme = "dark" | "light" | "system";
|
||||||
|
|
||||||
type ThemeProviderProps = {
|
type ThemeProviderProps = {
|
||||||
children: preact.VNode;
|
children: React.ReactNode;
|
||||||
defaultTheme?: Theme;
|
defaultTheme?: Theme;
|
||||||
storageKey?: string;
|
storageKey?: string;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user