Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ramongebben/react-reset-css
Reset CSS tools and components
https://github.com/ramongebben/react-reset-css
Last synced: about 1 month ago
JSON representation
Reset CSS tools and components
- Host: GitHub
- URL: https://github.com/ramongebben/react-reset-css
- Owner: RamonGebben
- Created: 2019-10-21T11:25:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T13:00:55.000Z (almost 2 years ago)
- Last Synced: 2024-03-20T10:44:30.540Z (9 months ago)
- Language: JavaScript
- Size: 604 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```bash
yarn add @pindakaasman/react-reset-css
# or
npm i @pindakaasman/react-reset-css
```## Usage
**As Component**
```js
const MyApp = () => {
return (
// ...My app
)
}
```**As Higher order component**
```js
const MyApp = () => {
return (
)
};export default withResetCSS(MyApp);
```**As Hook**
```js
const MyApp = () => {
useResetCSS();return (
<>
// ...My app
>
)
}
```## Credit
- [Andy Bell](https://github.com/hankchizljaw) for writing the article ["A Modern CSS Reset"](https://dev.to/hankchizljaw/a-modern-css-reset-6p3) which inspired me to create a component for it.
## TODO:
- Write tests
- More