🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@styled/modern-normalize

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@styled/modern-normalize

Modern normalize for styled-components CSS-in-JS library

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
4
Created
Source

@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

Keywords

styled

FAQs

Package last updated on 28 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts