2017-05-18 21:21:33 +03:00
|
|
|
import React, { Component } from 'react';
|
2017-06-02 04:27:28 +03:00
|
|
|
import { ThemeProvider, injectGlobal } from 'styled-components';
|
2017-05-18 21:21:33 +03:00
|
|
|
import theme from '../theme';
|
2017-10-04 20:30:10 +03:00
|
|
|
import Base from '../base';
|
|
|
|
import { loadedFontFamily } from '../typography';
|
2017-05-18 21:21:33 +03:00
|
|
|
|
2017-05-25 17:59:58 +03:00
|
|
|
const StyledBase = Base.extend`
|
2017-09-27 17:44:57 +03:00
|
|
|
/* trick prettier */
|
2017-05-18 21:21:33 +03:00
|
|
|
background-color: transparent;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default class Wrapper extends Component {
|
|
|
|
componentWillMount() {
|
|
|
|
// eslint-disable-next-line no-unused-expressions
|
|
|
|
injectGlobal`
|
2017-10-04 20:30:10 +03:00
|
|
|
[hidden] {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
html {
|
|
|
|
line-height: 1.15;
|
|
|
|
text-size-adjust: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
font-size: 15px;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
background: ${theme.background};
|
|
|
|
|
|
|
|
${loadedFontFamily};
|
|
|
|
}
|
|
|
|
|
|
|
|
html,
|
|
|
|
body,
|
|
|
|
#root {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.CodeMirror,
|
|
|
|
.ReactCodeMirror {
|
|
|
|
height: 100% !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.CodeMirror {
|
|
|
|
border: solid 1px ${theme.grey};
|
|
|
|
}
|
2017-05-18 21:21:33 +03:00
|
|
|
`;
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<ThemeProvider theme={theme}>
|
2017-08-28 22:21:08 +03:00
|
|
|
<StyledBase>{this.props.children}</StyledBase>
|
2017-05-18 21:21:33 +03:00
|
|
|
</ThemeProvider>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|