Permalink
Newer
100644
54 lines (47 sloc)
1.42 KB
3
import deepmerge from 'deepmerge'; // < 1kb payload overhead when lodash/merge is > 3kb.
5
import createTypography from './createTypography';
6
import createBreakpoints from './createBreakpoints';
7
import createPalette from './createPalette';
8
import createMixins from './createMixins';
11
import zIndex from './zIndex';
12
import spacing from './spacing';
13
14
function createMuiTheme(options: Object = {}) {
15
const {
16
palette: paletteInput = {},
17
breakpoints: breakpointsInput = {},
18
mixins: mixinsInput = {},
19
typography: typographyInput = {},
21
...other
22
} = options;
23
24
const palette = createPalette(paletteInput);
25
const breakpoints = createBreakpoints(breakpointsInput);
26
31
overrides: {}, // Inject custom styles
32
palette,
33
props: {}, // Inject custom properties
45
46
warning(
47
muiTheme.shadows.length === 25,
48
'Material-UI: the shadows array provided to createMuiTheme should support 25 elevations.',
49
);
50
51
return muiTheme;