Socket
Book a DemoInstallSign in
Socket

@pindakaasman/react-reset-css

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pindakaasman/react-reset-css

Reset CSS utils and components

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

React Reset CSS

Why?

When creating React based application it's very common nowadays to use things like Emotion and Styled Component. However when the need arises to do a reset CSS we fall back on things injectGlobal which kinda clutters that application code. This is why I created react-reset-css.

Installation

yarn add @pindakaasman/react-reset-css
# or
npm i @pindakaasman/react-reset-css

Usage

As Component

const MyApp = () => {
  return (
    <ResetCSS>
     // ...My app
    </ResetCSS>
  )
}

As Higher order component

const MyApp = () => {
  return (
    <div />
  )
};

export default withResetCSS(MyApp);

As Hook

const MyApp = () => {
  useResetCSS();

  return (
    <>
     // ...My app
    </>
  )
}

Credit

  • Andy Bell for writing the article "A Modern CSS Reset" which inspired me to create a component for it.

TODO:

  • Write tests
  • More

Keywords

react

FAQs

Package last updated on 24 Oct 2019

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