joyent-portal/packages/ui-toolkit/src/layout/root-container.js

22 lines
445 B
JavaScript
Raw Normal View History

import { Component } from 'react';
import { withTheme, injectGlobal } from 'styled-components';
import global from '../base/global';
class RootContainer extends Component {
componentWillMount() {
const { theme = {} } = this.props;
// eslint-disable-next-line no-unused-expressions
injectGlobal`
${global({ theme })};
`;
}
render() {
return this.props.children;
}
}
export default withTheme(RootContainer);