@pindakaasman/react-reset-css
v1.0.2
Published
Reset CSS utils and components
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-cssUsage
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
