feature: add normalize css
This commit is contained in:
parent
a4b081c572
commit
3efc1ed9e2
|
@ -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>
|
||||
|
|
10
app/theme.js
10
app/theme.js
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue