@pindakaasman/react-reset-css

Reset CSS utils and components

Usage no npm install needed!

<script type="module">
  import pindakaasmanReactResetCss from 'https://cdn.skypack.dev/@pindakaasman/react-reset-css';
</script>

README

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