react-layer-stack
Advanced tools
Comparing version 1.1.5 to 1.1.6
{ | ||
"name": "react-layer-stack", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Simple but ubiquitously powerful and agnostic layering system for React. Useful for any kind of windowing/popover/modals/tooltip application", | ||
"repository": "https://github.com/fckt/react-layer-stack.git", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fckt/react-layer-stack" | ||
}, | ||
"main": "lib/index.js", | ||
@@ -7,0 +10,0 @@ "scripts": { |
@@ -1,21 +0,9 @@ | ||
### Images to understand the whole thing | ||
#### View layers stack | ||
![Symlink](http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE1NzczMkBmczYudGlzdG9yeS5jb206L2F0dGFjaC8wLzEzMDAwMDAwMDAyMi5qcGc%3D) | ||
#### Layer id and "use" property (sym/soft link) | ||
![Symlink](http://1.bp.blogspot.com/-gZMz1nF3GC0/UiyehOS_bWI/AAAAAAAABQI/BpYyEtadcEg/s640/profiles1.png) | ||
### TODO: | ||
* examples | ||
* tests | ||
### Description | ||
I've designed `react-layer-stack` to fix one of the most tricky problems React users are facing with: **bottom-top** UI communication (modals, drag'n'drops, popovers, popups, windows). The lib allows to share context (closure) of deep children components with top layers: you can both use variables from closure (which will propagate automatically if you'll provide it to "use" property of Layer), Layer info (state, index in stack), callbacks (to show and hide layers) and also you can set event data from your toggle to Layer which is controlled by. | ||
I've designed `react-layer-stack` to fix one of the most tricky problems React users are facing with: **bottom-top** UI communication (modals, drag'n'drops, popovers, popups, windows). The lib allows to hold (or share) context (closure) of deep children components with the top layers: you can use variables from closure (which will propagate automatically if you'll provide it to `use` property of `Layer`). Anonymous function which renders `Layer` into `LayerStackMountPoint` receives: layer info (state, index in stack), callbacks (to show and hide layers) and event data from the toggle which controlls this `Layer`. | ||
### Real-world usage example | ||
Public API consist 2 key components: `Layer`, `LayerStackMountPoint` and 1 additional: `LayerToggle` (sometimes toggle needs to know which popover is open now) | ||
Set the LayerStackMountPoint somewhere on the top of the tree: | ||
Public API consist 2 key components: `Layer`, `LayerStackMountPoint` and 1 additional: `LayerToggle` (sometimes toggle needs to know which popover is open now). | ||
Set the `LayerStackMountPoint` somewhere on the top of the tree: | ||
@@ -38,3 +26,3 @@ ```javascript | ||
Define your layer. Each layer should have an `id` and `use` properties (will be explained): | ||
Define your `Layer`. This example shows how to propagate variables from lexical context (https://developer.mozilla.org/en/docs/Web/JavaScript/Closures) to the `Layer`, which will be displayed in the `LayerStackMountPoint`. Each layer should have an `id` and `use` properties. `use` property is needed to determine if we should update the lexical context of the anonymous function which renders `Modal` into `Layer` if `Cell` is re-rendered. | ||
@@ -82,1 +70,13 @@ ```javascript | ||
``` | ||
### Images to understand the whole thing | ||
#### View layers stack | ||
![Symlink](http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE1NzczMkBmczYudGlzdG9yeS5jb206L2F0dGFjaC8wLzEzMDAwMDAwMDAyMi5qcGc%3D) | ||
#### Layer id and "use" property (sym/soft link) | ||
![Symlink](http://1.bp.blogspot.com/-gZMz1nF3GC0/UiyehOS_bWI/AAAAAAAABQI/BpYyEtadcEg/s640/profiles1.png) | ||
### TODO: | ||
* examples | ||
* tests |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
33111
0