Doodle3D-Slicer/index.js

32 lines
903 B
JavaScript
Raw Normal View History

import 'babel-polyfill'
2017-11-11 20:23:45 +01:00
import React from 'react';
import { Interface } from 'doodle3d-slicer';
import { render } from 'react-dom';
2017-11-12 16:58:59 +01:00
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
2017-12-14 11:55:14 +01:00
import jss from 'jss';
import preset from 'jss-preset-default';
import normalize from 'normalize-jss';
import queryString from 'query-string';
2017-11-12 16:58:59 +01:00
injectTapEventPlugin();
2017-11-12 01:15:38 +01:00
2017-12-14 11:55:14 +01:00
jss.setup(preset());
jss.createStyleSheet(normalize).attach();
jss.createStyleSheet({
'@global': {
'*': { margin: 0, padding: 0 },
'#app, body, html': { height: '100%', fontFamily: 'sans-serif' },
body: { overflow: 'auto' },
html: { overflow: 'hidden' }
}
}).attach();
2017-11-12 13:08:51 +01:00
const { file } = queryString.parse(location.search);
render((
<MuiThemeProvider>
<Interface file={file} name="doodle"/>
</MuiThemeProvider>
), document.getElementById('app'));