@@ -59,6 +59,7 @@ import { Pagination, Tabs, Checkbox } from './MyDumbComponents'
5959</details >
6060
6161## ⚠️ Master is unstable
62+
6263> This branch is ** unstable** and is in ** active development** .
6364> For the latest stable version go to [ 0.1-stable branch] ( https://github.com/renatorib/react-powerplug/tree/0.1-stable )
6465
@@ -67,27 +68,29 @@ import { Pagination, Tabs, Checkbox } from './MyDumbComponents'
6768> ** _ Note_ ** _ This is a kind of a cheat sheet for fast search._
6869> _ If you want a more detailed ** API Reference** and examples for each component see [ full docs] ( /docs ) _
6970
70- | Component | Component Props | Render Props | |
71- | ---------------------------- | ----------------------- | ---------------------------------------------- | --------------------------------------------------------------------------- |
71+ | Component | Component Props | Render Props | |
72+ | ---------------------------- | ----------------------- | ---------------------------------------------- | ------------------------------------------------------------------------ |
7273| <h6 >STATE CONTAINERS</h6 > |
73- | ** \< State>** | ` { initial, onChange } ` | ` { state, setState } ` | [ :point_down : ] ( #state ) [ :books : ] ( docs/components/State.md ) |
74- | ** \< Toggle>** | ` { initial, onChange } ` | ` { on, toggle, set } ` | [ :point_down : ] ( #toggle ) [ :books : ] ( docs/components/Toggle.md ) |
75- | ** \< Counter>** | ` { initial, onChange } ` | ` {count, inc, dec, incBy, decBy, set } ` | [ :point_down : ] ( #counter ) [ :books : ] ( docs/components/Counter.md ) |
76- | ** \< Value>** | ` { initial, onChange } ` | ` { value, setValue, set } ` | [ :point_down : ] ( #value ) [ :books : ] ( docs/components/Value.md ) |
77- | ** \< Map>** | ` { initial, onChange } ` | ` { set, get, over, values } ` | [ :point_down : ] ( #map ) [ :books : ] ( docs/components/Map.md ) |
78- | ** \< Set>** | ` { initial, onChange } ` | ` { values, add, clear, remove, has } ` | [ :point_down : ] ( #set ) [ :books : ] ( docs/components/Set.md ) |
79- | ** \< List>** | ` { initial, onChange } ` | ` { list, first, last, push, pull, sort, set } ` | [ :point_down : ] ( #list ) [ :books : ] ( docs/components/List.md ) |
74+ | ** \< State>** | ` { initial, onChange } ` | ` { state, setState } ` | [ :point_down : ] ( #state ) [ :books : ] ( docs/components/State.md ) |
75+ | ** \< Toggle>** | ` { initial, onChange } ` | ` { on, toggle, set } ` | [ :point_down : ] ( #toggle ) [ :books : ] ( docs/components/Toggle.md ) |
76+ | ** \< Counter>** | ` { initial, onChange } ` | ` {count, inc, dec, incBy, decBy, set } ` | [ :point_down : ] ( #counter ) [ :books : ] ( docs/components/Counter.md ) |
77+ | ** \< Value>** | ` { initial, onChange } ` | ` { value, setValue, set } ` | [ :point_down : ] ( #value ) [ :books : ] ( docs/components/Value.md ) |
78+ | ** \< Map>** | ` { initial, onChange } ` | ` { set, get, over, values } ` | [ :point_down : ] ( #map ) [ :books : ] ( docs/components/Map.md ) |
79+ | ** \< Set>** | ` { initial, onChange } ` | ` { values, add, clear, remove, has } ` | [ :point_down : ] ( #set ) [ :books : ] ( docs/components/Set.md ) |
80+ | ** \< List>** | ` { initial, onChange } ` | ` { list, first, last, push, pull, sort, set } ` | [ :point_down : ] ( #list ) [ :books : ] ( docs/components/List.md ) |
8081| <h6 >FEEDBACK CONTAINERS</h6 > |
81- | ** \< Hover>** | ` { onChange } ` | ` { isHovered, bind } ` | [ :point_down : ] ( #hover ) [ :books : ] ( docs/components/Hover.md ) |
82- | ** \< Active>** | ` { onChange } ` | ` { isActive, bind } ` | [ :point_down : ] ( #active ) [ :books : ] ( docs/components/Active.md ) |
83- | ** \< Focus>** | ` { onChange } ` | ` { isFocused, bind } ` | [ :point_down : ] ( #focus ) [ :books : ] ( docs/components/Focus.md ) |
84- | ** \< Touch>** | ` { onChange } ` | ` { isTouched, bind } ` | [ :point_down : ] ( #touch ) [ :books : ] ( docs/components/Touch.md ) |
85- | ** \< FocusManager>** | ` { onChange } ` | ` { isFocused, blur, bind } ` | [ :point_down : ] ( #focusmanager ) [ :books : ] ( docs/components/FocusManager.md ) |
82+ | ** \< Hover>** | ` { onChange } ` | ` { isHovered, bind } ` | [ :point_down : ] ( #hover ) [ :books : ] ( docs/components/Hover.md ) |
83+ | ** \< Active>** | ` { onChange } ` | ` { isActive, bind } ` | [ :point_down : ] ( #active ) [ :books : ] ( docs/components/Active.md ) |
84+ | ** \< Focus>** | ` { onChange } ` | ` { isFocused, bind } ` | [ :point_down : ] ( #focus ) [ :books : ] ( docs/components/Focus.md ) |
85+ | ** \< Touch>** | ` { onChange } ` | ` { isTouched, bind } ` | [ :point_down : ] ( #touch ) [ :books : ] ( docs/components/Touch.md ) |
86+ | ** \< FocusManager>** | ` { onChange } ` | ` { isFocused, blur, bind } ` | [ :point_down : ] ( #focusmanager ) [ :books : ] ( docs/components/FocusManager.md ) |
8687| <h6 >FORM CONTAINERS</h6 > |
87- | ** \< Input>** | ` { initial, onChange } ` | ` { set, value, bind } ` | [ :point_down : ] ( #input ) [ :books : ] ( docs/components/Input.md ) |
88- | ** \< Form>** | ` { initial, onChange } ` | ` { input, values } ` | [ :point_down : ] ( #form ) [ :books : ] ( docs/components/Form.md ) |
88+ | ** \< Input>** | ` { initial, onChange } ` | ` { set, value, bind } ` | [ :point_down : ] ( #input ) [ :books : ] ( docs/components/Input.md ) |
89+ | ** \< Form>** | ` { initial, onChange } ` | ` { input, values } ` | [ :point_down : ] ( #form ) [ :books : ] ( docs/components/Form.md ) |
8990| <h6 >OTHER</h6 > |
90- | ** \< Compose>** | ` { components } ` | _ depends on components prop_ | [ :point_down : ] ( #composing-components ) [ :books : ] ( docs/components/Compose.md ) |
91+ | (docs/components/Compose.md) |
92+ | ** \< Interval>** | ` { delay } ` | ` { stop, start, toggle } ` | [ :point_down : ] ( #interval ) [ :books : ] ( docs/components/Interval.md ) |
93+ | ** \< Compose>** | ` { components } ` | _ depends on components prop_ | [ :point_down : ] ( #composing-components ) [ :books : ] |
9194
9295## Utilities
9396
@@ -281,13 +284,27 @@ import { Pagination, Tabs, Checkbox } from './MyDumbComponents'
281284 < Submit> Send< / Submit>
282285
283286 {/*
284- input(id) => { bind, set, value }
285- */ }
287+ input(id) => { bind, set, value }
288+ */ }
286289 < / form>
287290 )}
288291< / Form>
289292` ` `
290293
294+ ### Interval
295+
296+ ` ` ` jsx
297+ < Interval delay= {1000 }>
298+ {({ stop, start }) => (
299+ <>
300+ < div> The time is now {new Date ().toLocaleTimeString ()}< / div>
301+ < button onClick= {() => stop ()}> Stop interval< / button>
302+ < button onClick= {() => start ()}> Start interval< / button>
303+ < / >
304+ )}
305+ < / Interval>
306+ ` ` `
307+
291308# Composing Components
292309
293310If you want to avoid 'render props hell' you can compose two or more components in a single one.
0 commit comments