File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ Toggle custom hook and component wrapper for React 🔦
1414
1515- [ Installing] ( #installing )
1616- [ Example usage] ( #example-usage )
17+ - [ Toggle hook - ` useToggle() ` ] ( #toggle-hook---usetoggle )
18+ - [ Toggle wrapper - ` <ToggleWrap /> ` ] ( #toggle-wrapper---togglewrap- )
19+ - [ API] ( #api )
1720 - [ Toggle hook] ( #toggle-hook )
1821 - [ Toggle wrapper] ( #toggle-wrapper )
1922- [ Suggestions and/or questions] ( #suggestions-andor-questions )
@@ -34,7 +37,9 @@ yarn add @kodingdotninja/use-toggle
3437
3538## Example usage
3639
37- ### Toggle hook
40+ ### Toggle hook - ` useToggle() `
41+
42+ Use it as your usual hooks. ` disable ` , ` enable ` , or ` toggle ` does not accept parameters so you can use it on ` onClick ` handlers.
3843
3944``` jsx
4045import { useToggle } from " @kodingdotninja/use-toggle" ;
@@ -53,7 +58,9 @@ function App() {
5358}
5459```
5560
56- ### Toggle wrapper
61+ ### Toggle wrapper - ` <ToggleWrap /> `
62+
63+ Component which wraps the children with its internal hooks. Use this if you do not want to declare another component and just wrap it.
5764
5865``` jsx
5966import { ToggleWrap } from " kodingdotninja/use-toggle" ;
@@ -75,6 +82,16 @@ function App() {
7582}
7683```
7784
85+ ## API
86+
87+ ### Toggle hook
88+
89+ TODO
90+
91+ ### Toggle wrapper
92+
93+ TODO
94+
7895## Suggestions and/or questions
7996
8097Head over to our [ dedicated Discord channel for ` use-toggle ` ] ( https://discord.gg/KsHtDasn7e ) .
You can’t perform that action at this time.
0 commit comments