UNPKG

1.68 kBTypeScriptView Raw
1import { Breakpoints, BreakpointsOptions } from './createBreakpoints';
2import { Mixins, MixinsOptions } from './createMixins';
3import { Palette, PaletteOptions } from './createPalette';
4import { Typography, TypographyOptions } from './createTypography';
5import { Shadows } from './shadows';
6import { Shape, ShapeOptions } from './shape';
7import { Spacing, SpacingOptions } from './createSpacing';
8import { Transitions, TransitionsOptions } from './transitions';
9import { ZIndex, ZIndexOptions } from './zIndex';
10import { Overrides } from './overrides';
11import { ComponentsProps } from './props';
12
13export type Direction = 'ltr' | 'rtl';
14
15export interface ThemeOptions {
16 shape?: ShapeOptions;
17 breakpoints?: BreakpointsOptions;
18 direction?: Direction;
19 mixins?: MixinsOptions;
20 overrides?: Overrides;
21 palette?: PaletteOptions;
22 props?: ComponentsProps;
23 shadows?: Shadows;
24 spacing?: SpacingOptions;
25 transitions?: TransitionsOptions;
26 typography?: TypographyOptions | ((palette: Palette) => TypographyOptions);
27 zIndex?: ZIndexOptions;
28 unstable_strictMode?: boolean;
29}
30
31export interface Theme {
32 shape: Shape;
33 breakpoints: Breakpoints;
34 direction: Direction;
35 mixins: Mixins;
36 overrides?: Overrides;
37 palette: Palette;
38 props?: ComponentsProps;
39 shadows: Shadows;
40 spacing: Spacing;
41 transitions: Transitions;
42 typography: Typography;
43 zIndex: ZIndex;
44 unstable_strictMode?: boolean;
45}
46
47/**
48 * @deprecated
49 * Use `import { createTheme } from '@material-ui/core/styles'` instead.
50 */
51export function createMuiTheme(options?: ThemeOptions, ...args: object[]): Theme;
52
53export default function createTheme(options?: ThemeOptions, ...args: object[]): Theme;
54
\No newline at end of file