arciisine / MaterialThemeGenerator

Material Theme Generator application, written in Angular
https://materialtheme.arcsine.dev
MIT License
230 stars 47 forks source link

use with react react/material-ui [Question] #24

Open cmonacaps opened 4 years ago

cmonacaps commented 4 years ago

Hi,

At the moment using react/material-ui that uses jss - doc on theme api, complete default theme

I wonder how different is this? Perhaps it's completely compatible and a mechanical conversion from CSS could be written, possibly submitted as a PR so you could copy out JSS. Or perhaps the Material libraries in play are quite different and the best I could do is copy some values individually where it makes sense.

arciisine commented 4 years ago

It looks like the best bet would be to try to map the variables used to drive the SCSS file in angular, and see if there is an easy way to map those to the mui theme creation process. Not sure how the icon set would work, but worth a poke.

And I would gladly work with anyone on a PR. Some refactoring may be needed to support multiple render targets (angular scss and mui config), but should be minimal.

I'd start looking at https://github.com/arciisine/MaterialThemeGenerator/blob/master-source/src/app/theme.service.ts#L205, as that is the place where the Theme object gets rendered into SCSS.