Skip to content
Permalink
Newer
Older
100644 40 lines (35 sloc) 1005 Bytes
1
// @flow
2
3
import shadows from './shadows';
4
import transitions from './transitions';
5
import createTypography from './createTypography';
6
import createBreakpoints from './createBreakpoints';
7
import createPalette from './createPalette';
8
import createMixins from './createMixins';
9
import zIndex from './zIndex';
10
import spacing from './spacing';
11
12
function createMuiTheme(options: Object = {}) {
13
const {
14
palette: paletteInput = {},
15
breakpoints: breakpointsInput = {},
16
mixins: mixinsInput = {},
17
typography: typographyInput = {},
18
...other
19
} = options;
20
21
const palette = createPalette(paletteInput);
22
const breakpoints = createBreakpoints(breakpointsInput);
23
const mixins = createMixins(breakpoints, spacing, mixinsInput);
24
const typography = createTypography(palette, typographyInput);
25
26
return {
27
direction: 'ltr',
28
palette,
29
typography,
30
shadows,
31
transitions,
32
mixins,
33
spacing,
34
breakpoints,
35
zIndex,
36
...other,
37
};
38
}
39
40
export default createMuiTheme;