1 | import * as React from 'react';
|
2 | import { DefaultTheme } from '@mui/system';
|
3 | import { CssThemeVariables } from './createThemeNoVars';
|
4 | type ThemeProviderCssVariablesProps = CssThemeVariables extends {
|
5 | enabled: true;
|
6 | } ? {
|
7 | |
8 |
|
9 |
|
10 |
|
11 | colorSchemeNode?: Element | null;
|
12 | |
13 |
|
14 |
|
15 | disableNestedContext?: boolean;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | disableStyleSheetGeneration?: boolean;
|
23 | } : {};
|
24 | export interface ThemeProviderProps<Theme = DefaultTheme> extends ThemeProviderCssVariablesProps {
|
25 | children?: React.ReactNode;
|
26 | theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
|
27 | /**
|
28 | * The document used to perform `disableTransitionOnChange` feature
|
29 | * @default document
|
30 | */
|
31 | documentNode?: Document | null;
|
32 | /**
|
33 | * The default mode when the local storage has no mode yet,
|
34 | * requires the theme to have `colorSchemes` with light and dark.
|
35 | * @default 'system'
|
36 | */
|
37 | defaultMode?: 'light' | 'dark' | 'system';
|
38 | /**
|
39 | * The window that attaches the 'storage' event listener
|
40 | * @default window
|
41 | */
|
42 | storageWindow?: Window | null;
|
43 | /**
|
44 | * localStorage key used to store application `mode`
|
45 | * @default 'mui-mode'
|
46 | */
|
47 | modeStorageKey?: string;
|
48 | /**
|
49 | * localStorage key used to store `colorScheme`
|
50 | * @default 'mui-color-scheme'
|
51 | */
|
52 | colorSchemeStorageKey?: string;
|
53 | /**
|
54 | * Disable CSS transitions when switching between modes or color schemes
|
55 | * @default false
|
56 | */
|
57 | disableTransitionOnChange?: boolean;
|
58 | }
|
59 | export default function ThemeProvider<Theme = DefaultTheme>({ theme, ...props }: ThemeProviderProps<Theme>): React.JSX.Element;
|
60 | export {};
|
61 |
|
\ | No newline at end of file |