Skip to content

👊 A carefully crafted browser defaults for styled-components i.e. (CSS-IN-JS) solution.

License

Notifications You must be signed in to change notification settings

ahmadhuss/styled-default

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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