Blame view

天文台pc/tianwentai-ui/node_modules/@mui/system/createTheme/createTheme.d.ts 2.1 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
  import { CSSObject } from '@mui/styled-engine';
  import { Breakpoints, BreakpointsOptions } from "../createBreakpoints/createBreakpoints.js";
  import { Shape, ShapeOptions } from "./shape.js";
  import { Spacing, SpacingOptions } from "./createSpacing.js";
  import { SxConfig, SxProps } from "../styleFunctionSx/index.js";
  import { ApplyStyles } from "./applyStyles.js";
  import { CssContainerQueries } from "../cssContainerQueries/index.js";
  export { Breakpoint, Breakpoints, BreakpointOverrides } from "../createBreakpoints/createBreakpoints.js";
  export type Direction = 'ltr' | 'rtl';
  export interface Typography {}
  export interface Mixins {}
  export interface Shadows {}
  export interface Transitions {}
  export interface ZIndex {}
  export interface ThemeOptions {
    shape?: ShapeOptions | undefined;
    breakpoints?: BreakpointsOptions | undefined;
    direction?: Direction | undefined;
    mixins?: Mixins | undefined;
    palette?: Record<string, any> | undefined;
    shadows?: Shadows | undefined;
    spacing?: SpacingOptions | undefined;
    transitions?: Transitions | undefined;
    components?: Record<string, any> | undefined;
    typography?: Typography | undefined;
    zIndex?: ZIndex | undefined;
    unstable_sxConfig?: SxConfig | undefined;
  }
  export interface Theme extends CssContainerQueries {
    shape: Shape;
    breakpoints: Breakpoints;
    direction: Direction;
    palette: Record<string, any> & {
      mode: 'light' | 'dark';
    };
    shadows?: Shadows | undefined;
    spacing: Spacing;
    transitions?: Transitions | undefined;
    components?: Record<string, any> | undefined;
    mixins?: Mixins | undefined;
    typography?: Typography | undefined;
    zIndex?: ZIndex | undefined;
    applyStyles: ApplyStyles<'light' | 'dark'>;
    unstable_sxConfig: SxConfig;
    unstable_sx: (props: SxProps<Theme>) => CSSObject;
  }
  
  /**
   * 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, ...args: object[]): Theme;