File tree Expand file tree Collapse file tree 1 file changed +48
-1
lines changed
Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Original file line number Diff line number Diff line change 1818 <sub>Created by <a href="https://twitter.com/theoliveralr">Oliver ALR</a> and mantained with ❤️ and ☕️. Join me just contributing :atom:</sub>
1919</div >
2020
21+ <br />
22+
2123## Features
2224
2325<dl >
3739 <dd>Render or not an expected value based on a boolean prop.</dd>
3840</dl >
3941
42+ ### Get Started
43+
44+ ```
45+ npm install react-hider
46+ ```
47+
48+ ```
49+ import Hider from 'react-hider'
50+ ```
51+
52+ ``` jsx
53+ < Hider>
54+ < MyComponent / >
55+ < / Hider>
56+ ```
57+
4058## Examples Up and Running
4159
42- Add Examples Here...
60+ ``` jsx
61+ const DisAppear = () => {
62+ const [hide , setHide ] = useState (true )
63+
64+ return (
65+ < div>
66+ < Hider state= {hide}>
67+ < Show / >
68+ < Hide / >
69+ < / Hider>
70+ < button onClick= {() => setHide (false )}> Click to Change< / button>
71+ < / div>
72+ )
73+ }
74+ ```
75+
76+ ``` jsx
77+ const Appear = () => {
78+ const [show , setShow ] = useState (false )
79+
80+ return (
81+ < div>
82+ < Hider state= {show}>
83+ < Show / >
84+ < / Hider>
85+ < button onClick= {() => setShow (true )}> Click to Show< / button>
86+ < / div>
87+ )
88+ }
89+ ```
4390
4491## License
4592
You can’t perform that action at this time.
0 commit comments