Skip to content

Latest commit

 

History

History
48 lines (40 loc) · 760 Bytes

README.md

File metadata and controls

48 lines (40 loc) · 760 Bytes

styled-default

A carefully crafted browser defaults for styled-components.

Installation

npm:

npm install styled-default

Yarn:

yarn add styled-default

Usage with styled-components

// 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');

License

MIT