Skip to content

Commit 53a0460

Browse files
author
Oliver ALR
committed
README up to date
1 parent 7250e93 commit 53a0460

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
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>
@@ -37,9 +39,54 @@
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

0 commit comments

Comments
 (0)