React component connecting your Fronto config with application created using material-ui
.
Add fronto-material-ui
to your package.json
:
$ npm install fronto-material-ui
Import fronto component in application entry file and wrap your app with it:
import React from 'react';
import ReactDOM from 'react-dom';
import {FrontoThemeProvider} from 'fronto-material-ui';
import YourAppRootComponent from './YourAppRootComponent';
function App() {
return (
<FrontoThemeProvider clientId={'5b1acfb121652a131b0662c6'}>
<YourAppRootComponent/>
</FrontoThemeProvider>
);
}
ReactDOM.render(<App />, document.querySelector('#app'));