wix-incubator / react-templates

Light weight templates for react
https://wix.github.io/react-templates
MIT License
2.82k stars 207 forks source link

use with material-ui #242

Open hurano opened 6 years ago

hurano commented 6 years ago

Can we use this react-templates with material-ui?

How can we write the code in rt template in the following case?

import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';

`

Hello World

  </MuiThemeProvider>
);`
zainxyz commented 6 years ago

From what I read at the homepage https://wix.github.io/react-templates/ ... this should work.

<rt-import name="MuiThemeProvider" from="material-ui/styles/MuiThemeProvider" />
<div>
  <MuiThemeProvider muiTheme="{this.props.muiTheme}">
    <h1>Hello World</h1>
  </MuiThemeProvider>
</div>