@@ -13,16 +13,16 @@ The need a fast way to bind keys to a react-powered UI with awesome redux for st
1313## Installation
1414` react-keys ` requires ** React 0.14 or later**
1515
16- ` yarn install react-keys `
16+ ` yarn add react-keys `
1717
1818## Dependencies
1919
2020While not having direct dependencies, react-keys have to be used with ` react ` , ` react-dom ` and ` redux ` :
2121
2222``` javscript
23- yarn install react
24- yarn install react-dom
25- yarn install redux
23+ yarn add react
24+ yarn add react-dom
25+ yarn add redux
2626```
2727
2828# Link it with Redux (Otherwise it doesn't work !)
@@ -147,6 +147,7 @@ renderWithId('mosaic-1-1');
147147* ` filter ` (string / * optional* ) class name which exclude element
148148* ` debounce ` (number / * optional* ) define a debounce for keys press in ms (default global debounce)
149149* ` enterStrategy ` (string / * optional* ) define strape strategy on enter: ` start ` / ` mirror ` / ` memory ` / ` none ` (default ` none ` )
150+ * ` position ` (string / * optional* ) to better handle for enterStrategy (vertial/horizontal) (default ` horizontal ` )
150151* ` gap ` (number / * optional* ) reduce or increase elements margin (default ` 0 ` )`
151152* ` boundedGap ` (number / * optional* ) reduce or increase bounded margin (default ` 0 ` )
152153* ` topGap ` (number / * optional* ) reduce or increase last top margin (default ` 0 ` )
@@ -278,6 +279,14 @@ the keys store will manage the state of each binders (no matter how many they ar
278279
279280So you can listen the change of theses values for each binder
280281
282+ ### Selectors
283+ Selectors give you easy control on your data binder, here few selectors for common use. they return a function
284+ * `isCurrentBinder(binderId)` determine if your binder is the current binder
285+ * `isBinderActive(binderId)` determine if your binder is active
286+ * `getBinderMarginLeft(binderId)` determine marginLeft of a binder
287+ * `getBinderMarginTop(binderId)` determine marginTop of a binder
288+ * `getBinderSelectedId(binderId)` determine selectedId of a binder
289+
281290### Action launchers
282291* `activeBinder(binderId, selectedId(optional))` activate a new binder by giving its id (first id by default)
283292* `resetBinder(binderId, selectedId(optional))` reset binder by giving its id (first id by default)
0 commit comments