Skip to content

Commit

Permalink
Allow to pass mixins as a function to createMuiTheme()
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya committed Nov 15, 2019
1 parent 64ae0c6 commit 24263d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/createMixins.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface MixinsOptions extends Partial<Mixins> {
export default function createMixins(
breakpoints: Breakpoints,
spacing: Spacing,
mixins: MixinsOptions,
mixins: MixinsOptions | ((breakpoints: Breakpoints, spacing: Spacing) => MixinsOptions),
): Mixins;
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/createMixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ export default function createMixins(breakpoints, spacing, mixins) {
minHeight: 64,
},
},
...mixins,
...(typeof mixins === 'function' ? mixins(breakpoints, spacing) : mixins),
};
}

0 comments on commit 24263d3

Please sign in to comment.