Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/styles/ThemeProvider.d.ts 2.38 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
  import * as React from 'react';
  import { DefaultTheme } from '@mui/system';
  import { StorageManager } from '@mui/system/cssVars';
  import { CssThemeVariables } from "./createThemeNoVars.js";
  type ThemeProviderCssVariablesProps = CssThemeVariables extends {
    enabled: true;
  } ? {
    /**
     * The node for attaching the `theme.colorSchemeSelector`.
     * @default document
     */
    colorSchemeNode?: Element | null;
    /**
     * If `true`, the provider creates its own context and generate stylesheet as if it is a root `ThemeProvider`.
     */
    disableNestedContext?: boolean;
    /**
     * If `true`, the style sheet for CSS theme variables won't be generated.
     *
     * This is useful for controlling nested ThemeProvider behavior.
     * @default false
     */
    disableStyleSheetGeneration?: boolean;
    /**
     * If `true`, theme values are recalculated when the mode changes.
     * The `theme.colorSchemes.{mode}.*` nodes will be shallow merged to the top-level of the theme.
     * @default false
     */
    forceThemeRerender?: boolean;
  } : {};
  export interface ThemeProviderProps<Theme = DefaultTheme> extends ThemeProviderCssVariablesProps {
    children?: React.ReactNode;
    theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
    /**
     * The document used to perform `disableTransitionOnChange` feature
     * @default document
     */
    documentNode?: Document | null;
    /**
     * The default mode when the local storage has no mode yet,
     * requires the theme to have `colorSchemes` with light and dark.
     * @default 'system'
     */
    defaultMode?: 'light' | 'dark' | 'system';
    /**
     * The window that attaches the 'storage' event listener
     * @default window
     */
    storageWindow?: Window | null;
    /**
     * The storage manager to be used for storing the mode and color scheme
     * @default using `window.localStorage`
     */
    storageManager?: StorageManager | null;
    /**
     * localStorage key used to store application `mode`
     * @default 'mui-mode'
     */
    modeStorageKey?: string;
    /**
     * localStorage key used to store `colorScheme`
     * @default 'mui-color-scheme'
     */
    colorSchemeStorageKey?: string;
    noSsr?: boolean;
    /**
     * Disable CSS transitions when switching between modes or color schemes
     * @default false
     */
    disableTransitionOnChange?: boolean;
  }
  export default function ThemeProvider<Theme = DefaultTheme>({
    theme,
    ...props
  }: ThemeProviderProps<Theme>): import("react/jsx-runtime").JSX.Element;
  export {};