Please export createGenerateClassName and jssPreset #10858
Labels
good first issue
Great for first contributions. Enable to learn the contribution process.
new feature
New feature or request
Sometimes it's necessary to customize the JssProvider as described here, when that happens it's necessary to import the
createGenerateClassName
andjssPreset
from material-ui.However currently
index.js
andindex.es.js
do not export these. In order to import these you have to directly import them frommaterial-ui/styles
instead ofmaterial-ui
.I think it's reasonable to expect that you can
import {createGenerateClassName, jssPreset} from 'material-ui';
when it's valid toimport {withStyles} from 'material-ui';
.The distaste with this is also the fact that
material-ui/styles
is an explicit module import. What is imported when you importmaterial-ui
is environment dependent because of the existence of bothmain
andmodule
. Importingmaterial-ui/styles
directly requires me to assume that I'm always in an environment wherematerial-ui/styles
is whatmaterial-ui
imports forwithTheme
, etc... under the hood and it will never ever bematerial-ui/es/styles
ormaterial-ui/modules/styles
.Your Environment
The text was updated successfully, but these errors were encountered: