mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 14:54:58 -05:00
fix: change types
This commit is contained in:
parent
346f9d210e
commit
9026c69ca7
@ -34,6 +34,18 @@ import * as React from "react";
|
|||||||
import { ThemeProvider as NextThemesProvider, useTheme } from "next-themes";
|
import { ThemeProvider as NextThemesProvider, useTheme } from "next-themes";
|
||||||
import { type ThemeProviderProps } from "next-themes/dist/types";
|
import { type ThemeProviderProps } from "next-themes/dist/types";
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Document {
|
||||||
|
startViewTransition(updateCallback: () => void):
|
||||||
|
| {
|
||||||
|
finished: Promise<void>;
|
||||||
|
ready: Promise<void>;
|
||||||
|
updateCallbackDone: Promise<void>;
|
||||||
|
}
|
||||||
|
| undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
||||||
const [mounted, setMounted] = React.useState(false);
|
const [mounted, setMounted] = React.useState(false);
|
||||||
|
|
||||||
@ -48,7 +60,7 @@ export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
|||||||
|
|
||||||
interface UseThemeTransitionResult {
|
interface UseThemeTransitionResult {
|
||||||
theme: string | undefined;
|
theme: string | undefined;
|
||||||
changeTheme: (changeTheme: string) => () => void;
|
changeTheme: (changeTheme: string) => void;
|
||||||
mounted: boolean;
|
mounted: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user