A carefully crafted browser defaults for styled-components.
npm:
npm install styled-default
Yarn:
yarn add styled-default
// global-style.js
import { createGlobalStyle } from 'styled-components';
import reset from 'styled-default';
const GlobalStyle = createGlobalStyle`
${reset}
/* other styles */
`
export default GlobalStyle;
// app.js
import GlobalStyle from './global-style';
const App = () => (
<>
<GlobalStyle />
<div>Hi!</div>
</>
}
export default App;
You can also use named imports:
// ES Modules
import { reset } from 'styled-default';
// CommonJS
const { reset } = require('styled-default');