github.com/sberex/go-sberex@v1.8.2-0.20181113200658-ed96ac38f7d7/dashboard/assets/index.jsx (about) 1 // @flow 2 3 // This file is part of the go-sberex library. The go-sberex library is 4 // free software: you can redistribute it and/or modify it under the terms 5 // of the GNU Lesser General Public License as published by the Free 6 // Software Foundation, either version 3 of the License, or (at your option) 7 // any later version. 8 // 9 // The go-sberex library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 12 // General Public License <http://www.gnu.org/licenses/> for more details. 13 14 import React from 'react'; 15 import {render} from 'react-dom'; 16 17 import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; 18 import createMuiTheme from 'material-ui/styles/createMuiTheme'; 19 20 import Dashboard from './components/Dashboard'; 21 22 const theme: Object = createMuiTheme({ 23 palette: { 24 type: 'dark', 25 }, 26 }); 27 const dashboard = document.getElementById('dashboard'); 28 if (dashboard) { 29 // Renders the whole dashboard. 30 render( 31 <MuiThemeProvider theme={theme}> 32 <Dashboard /> 33 </MuiThemeProvider>, 34 dashboard, 35 ); 36 }