Skip to content

Instantly share code, notes, and snippets.

@dlochrie
dlochrie / combineStyles.js
Created October 9, 2018 13:45
Utility that combines and merges multiple Material UI styles into on function for usage with the "withStyles" HOC.
/**
* Combines/merges Material UI styles so that they may be used on a single
* component with the "withStyles" HOC.
*
* @see {@link https://github.com/mui-org/material-ui/issues/11517#issuecomment-407509327}
* @see {@link https://material-ui.com/customization/css-in-js/}
*
* Usage:
*
* import { combineStyles } from '/path/to/thisFile';