Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Jun 3, 2021
1 parent 849da33 commit 1b26150
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/createMixins.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import createMixins from './createMixins';
import { createTheme } from '@material-ui/core/styles';
import createMixins from './createMixins';

describe('createMixins', () => {
it('should be able add other mixins', () => {
Expand Down
24 changes: 12 additions & 12 deletions packages/material-ui/src/styles/createTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ import zIndex from './zIndex';

function createTheme(options = {}, ...args) {
const {
breakpoints: breakpointsInput,
mixins: mixinsInput = {},
spacing: spacingInput,
palette: paletteInput = {},
transitions: transitionsInput = {},
typography: typographyInput = {},
shape: shapeInput,
...other
} = options;

const palette = createPalette(paletteInput);
const systemTheme = systemCreateTheme(options);

let muiTheme = deepmerge(
systemTheme,
{
mixins: createMixins(systemTheme.breakpoints, systemTheme.spacing, mixinsInput),
palette,
// Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
shadows: shadows.slice(),
typography: createTypography(palette, typographyInput),
transitions: createTransitions(transitionsInput),
zIndex: { ...zIndex },
},
);
let muiTheme = deepmerge(systemTheme, {
mixins: createMixins(systemTheme.breakpoints, systemTheme.spacing, mixinsInput),
palette,
// Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
shadows: shadows.slice(),
typography: createTypography(palette, typographyInput),
transitions: createTransitions(transitionsInput),
zIndex: { ...zIndex },
});

muiTheme = deepmerge(muiTheme, other);
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
Expand Down

0 comments on commit 1b26150

Please sign in to comment.