Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oscarcornejo/render-if
RenderIf is a function that receives a validation as a parameter, and if that validation is true, the content passed as children will be displayed. Try it!
https://github.com/oscarcornejo/render-if
mit-license npm npm-package nrwl nx react testing-library typescript
Last synced: 20 days ago
JSON representation
RenderIf is a function that receives a validation as a parameter, and if that validation is true, the content passed as children will be displayed. Try it!
- Host: GitHub
- URL: https://github.com/oscarcornejo/render-if
- Owner: oscarcornejo
- Created: 2022-05-23T19:13:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-23T19:45:37.000Z (over 2 years ago)
- Last Synced: 2024-12-12T21:38:17.855Z (30 days ago)
- Topics: mit-license, npm, npm-package, nrwl, nx, react, testing-library, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@austral-ui/render-if
- Size: 3.91 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RenderIf
![npm](https://img.shields.io/badge/npm-austral--ui%2Frender--if-blue)
![GitHub issues](https://img.shields.io/github/issues-raw/oscarcornejo/render-if)
![NPM](https://img.shields.io/npm/dw/@austral-ui/render-if)RenderIf is a function that receives a validation as a parameter, and if that validation is true, the content passed as children will be displayed. Try it!
## Installation
```
npm install @austral-ui/render-if
```## Usage
### **See it in Action**
```
import React from 'react';
import { RenderIf } from '@austral-ui/render-if';export function App() {
const widthSize = window.innerWidth;
return (
600}>
You are using a large screen
);
}export default App;
```## Support
If you have read the examples and have any issues which you know are glitches, or would like to request something changed, please feel free to [post an issue on Github](https://github.com/oscarcornejo/render-if/issues/new).
Otherwise, if this was useful and you'd like to show your support, no donations necessary, but please consider [checking out the repo](https://github.com/oscarcornejo/render-if) and giving it a star (⭐).
## License
- Open Source **[MIT license](http://opensource.org/licenses/mit-license.php)**