@austral-ui/render-if
v1.0.1
Published
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!
Downloads
5
Maintainers
Readme
RenderIf
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 (
<div>
<RenderIf isTrue={widthSize > 600}>
<span>You are using a large screen</span>
</RenderIf>
</div>
);
}
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.
Otherwise, if this was useful and you'd like to show your support, no donations necessary, but please consider checking out the repo and giving it a star (⭐).
License
- Open Source MIT license