hotfix: add normalize styles in docz wrapper

This commit is contained in:
George Lima 2018-12-10 18:23:21 -03:00
parent 5915398d76
commit b671f7bb8d
1 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,5 @@
// @flow
import React from 'react';
import React, { Fragment } from 'react';
import theme from 'styled-theming';
import { ThemeProvider, createGlobalStyle } from 'styled-components';
// $FlowFixMe
@ -40,10 +40,17 @@ const appTheme = {
},
};
/* eslint-disable react/prop-types */
// $FlowFixMe
export const DoczWrapper = ({ children }) => <ThemeProvider theme={appTheme}>{children()}</ThemeProvider>;
export const GlobalStyle = createGlobalStyle`${[normalize()]}`;
/* eslint-disable react/prop-types */
// $FlowFixMe
export const DoczWrapper = ({ children }) => (
<ThemeProvider theme={appTheme}>
<Fragment>
<GlobalStyle />
{children()}
</Fragment>
</ThemeProvider>
);
export default appTheme;