@styled/modern-normalize
v1.0.1
Published
Modern normalize for styled-components CSS-in-JS library
Downloads
20
Maintainers
Readme
@styled/modern-normalize
CSS-normalize library for styled-components.
The original modern-normalize.css
is pulled from sindresorhus/modern-normalize, and parsed into styled ready format.
Usage
npm install --save @styled/modern-normalize
Readme
Read styled-components createGlobalStyle documentation
This is just example
import React from 'react'
import { Normalize } from '@styled/modern-normalize'
import { App } from './app'
const Root = () => (
<React.Fragment>
<Normalize />
<App />
</React.Fragment>
)
For older version of styled-components this API renders to
null
You can also use named imports:
// ES Modules
import { Normalize } from '@styled/modern-normalize'
// CommonJS
const { Normalize } = require('@styled/modern-normalize')
You can also import css without Component API:
import { normalize } from '@styled/modern-normalize'
// Different from `Normalize`
// Example usage:
injectGlobal`
${normalize}
`
License
The MIT License