Skip to content

Commit

Permalink
[core] Remove unnecessary spacing parameter from createMixins met…
Browse files Browse the repository at this point in the history
…hod (#32690)
  • Loading branch information
ZeeshanTamboli authored May 12, 2022
1 parent 673cb59 commit e5dcd44
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions packages/mui-material/src/styles/createMixins.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as CSS from 'csstype';
import { Breakpoints, Spacing } from '@mui/system';
import { Breakpoints } from '@mui/system';

export type NormalCssProperties = CSS.Properties<number | string>;
export type Fontface = CSS.AtRule.FontFace & { fallbacks?: CSS.AtRule.FontFace[] };
Expand Down Expand Up @@ -32,8 +32,4 @@ export interface MixinsOptions extends Partial<Mixins> {
// ... use interface declaration merging to add custom mixin options
}

export default function createMixins(
breakpoints: Breakpoints,
spacing: Spacing,
mixins: MixinsOptions,
): Mixins;
export default function createMixins(breakpoints: Breakpoints, mixins: MixinsOptions): Mixins;
2 changes: 1 addition & 1 deletion packages/mui-material/src/styles/createMixins.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function createMixins(breakpoints, spacing, mixins) {
export default function createMixins(breakpoints, mixins) {
return {
toolbar: {
minHeight: 56,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/styles/createMixins.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import createMixins from './createMixins';
describe('createMixins', () => {
it('should be able add other mixins', () => {
const theme = createTheme();
const mixins = createMixins(theme.breakpoints, theme.spacing, { test: { display: 'block' } });
const mixins = createMixins(theme.breakpoints, { test: { display: 'block' } });

expect(mixins.test).to.deep.equal({
display: 'block',
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/styles/createTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function createTheme(options = {}, ...args) {
const systemTheme = systemCreateTheme(options);

let muiTheme = deepmerge(systemTheme, {
mixins: createMixins(systemTheme.breakpoints, systemTheme.spacing, mixinsInput),
mixins: createMixins(systemTheme.breakpoints, mixinsInput),
palette,
// Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
shadows: shadows.slice(),
Expand Down

0 comments on commit e5dcd44

Please sign in to comment.