@pindakaasman/react-reset-css

1.0.2 • Public • Published

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

TODO:

  • Write tests
  • More

Readme

Keywords

Package Sidebar

Install

npm i @pindakaasman/react-reset-css

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

6.49 kB

Total Files

10

Last publish

Collaborators

  • pindakaasman