-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Theme UI to material-ui transformer #164
Comments
I want to help with that! I've been wanting a better style api for Where do I get started? |
I think it'd be a matter of looking at the |
Hey @jxnblk - until something like this gets built, I'm curious, how would you personally go about using material-ui components inside a project that uses styled-system or theme-ui? Or would you just recommend using Material's system package for now? |
@adamsoffer I haven't used Material UI myself, so I'm not sure. I believe they use JSS (which I also haven't used), but I suspect it should be compatible with Styled System |
@adamsoffer if I understood correctly, one would still use Material-UI as it is but when wanting to update the theme, do it through theme-ui. The utility would parse the theme-ui object into Material-UI theme object. |
Thanks @lemes. What I'm doing for now is using theme-ui for everything and anywhere I need to use a material component I just manually get specific theme variables from theme-ui's context and pass it to the material-ui theme. Basically, I'm doing this for now:
|
Yeah, ideally there would be a utility/component to use Material UI components within a Theme UI application, where the An API for this could look something like this: import React from 'react'
import { ThemeProvider } from 'theme-ui'
import { MaterialUIProvider } from '@theme-ui/material-ui'
import theme from './theme'
export default props =>
<ThemeProvider theme={theme}>
<MaterialUIProvider>
{props.children}
</MaterialUIProvider>
</ThemeProvider> |
Nice. Yeah, that would be sweet. |
@lemes - did you by any chance take a stab at this? |
@adamsoffer I didn't 😞but please do fell free to try it. |
Closing this out since there hasn't been much traction here -- feel free to open a new issue or PR if anyone wants to look into this |
The
material-ui
library has its own, similar theming API. It'd be great to support using these components within a theme-ui applicationThe text was updated successfully, but these errors were encountered: