2017-09-20 12:30:53 +03:00
|
|
|
import { Component } from 'react';
|
2017-10-09 16:48:27 +03:00
|
|
|
import { withTheme, injectGlobal } from 'styled-components';
|
|
|
|
|
2017-10-18 05:29:47 +03:00
|
|
|
import global from '../base/global';
|
|
|
|
|
2017-09-20 12:30:53 +03:00
|
|
|
class RootContainer extends Component {
|
|
|
|
componentWillMount() {
|
2017-11-23 14:18:38 +02:00
|
|
|
const { theme = {} } = this.props;
|
2017-10-09 16:48:27 +03:00
|
|
|
|
2017-09-20 12:30:53 +03:00
|
|
|
// eslint-disable-next-line no-unused-expressions
|
|
|
|
injectGlobal`
|
2017-10-18 05:29:47 +03:00
|
|
|
${global({ theme })};
|
2017-09-20 12:30:53 +03:00
|
|
|
`;
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return this.props.children;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default withTheme(RootContainer);
|