feature: add normalize css

This commit is contained in:
George Lima 2018-11-28 23:45:37 -03:00
parent a4b081c572
commit 3efc1ed9e2
2 changed files with 12 additions and 5 deletions

View File

@ -7,7 +7,7 @@ import { ThemeProvider } from 'styled-components';
import { configureStore, history } from './redux/create';
import { Router } from './router/container';
import theme from './theme';
import theme, { GlobalStyle } from './theme';
const store = configureStore({});
@ -15,7 +15,10 @@ export default () => (
<ThemeProvider theme={theme}>
<Provider store={store}>
<ConnectedRouter history={history}>
<Router />
<div>
<GlobalStyle />
<Router />
</div>
</ConnectedRouter>
</Provider>
</ThemeProvider>

View File

@ -1,6 +1,8 @@
// @flow
import React from 'react';
import { ThemeProvider } from 'styled-components';
import { ThemeProvider, createGlobalStyle } from 'styled-components';
// $FlowFixMe
import { normalize } from 'polished';
import theme from 'styled-theming';
import { DARK } from './constants/themes';
@ -24,8 +26,10 @@ const appTheme = {
},
};
export default appTheme;
/* eslint-disable react/prop-types */
// $FlowFixMe
export const DoczWrapper = ({ children }) => <ThemeProvider theme={appTheme}>{children()}</ThemeProvider>;
export const GlobalStyle = createGlobalStyle`${normalize()}`;
export default appTheme;