Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/styles/createTheme.d.ts 1.14 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  import { PaletteOptions } from "./createPalette.js";
  import { ColorSystemOptions } from "./createThemeFoundation.js";
  import { CssVarsThemeOptions } from "./createThemeWithVars.js";
  import { Theme, CssThemeVariables } from "./createThemeNoVars.js";
  export type { Theme, CssThemeVariables } from "./createThemeNoVars.js";
  type CssVarsOptions = CssThemeVariables extends {
    enabled: true;
  } ? ColorSystemOptions : {};
  type CssVarsConfigList = 'colorSchemeSelector' | 'rootSelector' | 'disableCssColorScheme' | 'cssVarPrefix' | 'shouldSkipGeneratingVar' | 'nativeColor';
  export interface ThemeOptions extends CssVarsOptions, Omit<CssVarsThemeOptions, CssVarsConfigList> {
    cssVariables?: boolean | Pick<CssVarsThemeOptions, CssVarsConfigList>;
    palette?: PaletteOptions;
  }
  /**
   * Generate a theme base on the options received.
   * @param options Takes an incomplete theme object and adds the missing parts.
   * @param args Deep merge the arguments with the about to be returned theme.
   * @returns A complete, ready-to-use theme object.
   */
  export default function createTheme(options?: ThemeOptions,
  // cast type to skip module augmentation test
  ...args: object[]): Theme;