The shape of the theme context value provided to consumers.
interface ThemeContextType { theme: ThemePreferences; isDarkMode: boolean; setThemeMode: (mode: ThemeMode) => Promise<boolean>; toggleTheme: () => Promise<boolean>;} Copy
interface ThemeContextType { theme: ThemePreferences; isDarkMode: boolean; setThemeMode: (mode: ThemeMode) => Promise<boolean>; toggleTheme: () => Promise<boolean>;}
The current theme preferences (system and local).
Whether dark mode is currently enabled.
Function to set the theme mode.
Function to toggle between dark and light modes.
The shape of the theme context value provided to consumers.
Source