react-drawers
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -2080,6 +2080,10 @@ import React, { useContext } from 'react'; | ||
rightWidth: props.right, | ||
topCollapsedHeight: props.topCollapsedHeight, | ||
leftCollapsedWidth: props.leftCollapsedWidth, | ||
rightCollapsedWidth: props.rightCollapsedWidth, | ||
bottomCollapsedHeight: props.bottomCollapsedHeight, | ||
toggleTop: function toggleTop() { | ||
_this.setState(function (prevState) { | ||
return { | ||
top: prevState.topHeight - prevState.top | ||
top: prevState.topHeight === prevState.top ? prevState.topCollapsedHeight : prevState.topHeight | ||
}; | ||
@@ -2091,3 +2095,3 @@ }); | ||
return { | ||
bottom: prevState.bottomHeight - prevState.bottom | ||
bottom: prevState.bottomHeight === prevState.bottom ? prevState.bottomCollapsedHeight : prevState.bottomHeight | ||
}; | ||
@@ -2099,3 +2103,3 @@ }); | ||
return { | ||
left: prevState.leftWidth - prevState.left | ||
left: prevState.leftWidth === prevState.left ? prevState.leftCollapsedWidth : prevState.leftWidth | ||
}; | ||
@@ -2107,3 +2111,3 @@ }); | ||
return { | ||
right: prevState.rightWidth - prevState.right | ||
right: prevState.rightWidth === prevState.right ? prevState.rightCollapsedWidth : prevState.rightWidth | ||
}; | ||
@@ -2158,2 +2162,6 @@ }); | ||
rightOpenOnStart: true, | ||
topCollapsedHeight: 0, | ||
leftCollapsedWidth: 0, | ||
rightCollapsedWidth: 0, | ||
bottomCollapsedHeight: 0, | ||
mode: 'TBLR' | ||
@@ -2160,0 +2168,0 @@ }; |
@@ -2085,6 +2085,10 @@ 'use strict'; | ||
rightWidth: props.right, | ||
topCollapsedHeight: props.topCollapsedHeight, | ||
leftCollapsedWidth: props.leftCollapsedWidth, | ||
rightCollapsedWidth: props.rightCollapsedWidth, | ||
bottomCollapsedHeight: props.bottomCollapsedHeight, | ||
toggleTop: function toggleTop() { | ||
_this.setState(function (prevState) { | ||
return { | ||
top: prevState.topHeight - prevState.top | ||
top: prevState.topHeight === prevState.top ? prevState.topCollapsedHeight : prevState.topHeight | ||
}; | ||
@@ -2096,3 +2100,3 @@ }); | ||
return { | ||
bottom: prevState.bottomHeight - prevState.bottom | ||
bottom: prevState.bottomHeight === prevState.bottom ? prevState.bottomCollapsedHeight : prevState.bottomHeight | ||
}; | ||
@@ -2104,3 +2108,3 @@ }); | ||
return { | ||
left: prevState.leftWidth - prevState.left | ||
left: prevState.leftWidth === prevState.left ? prevState.leftCollapsedWidth : prevState.leftWidth | ||
}; | ||
@@ -2112,3 +2116,3 @@ }); | ||
return { | ||
right: prevState.rightWidth - prevState.right | ||
right: prevState.rightWidth === prevState.right ? prevState.rightCollapsedWidth : prevState.rightWidth | ||
}; | ||
@@ -2163,2 +2167,6 @@ }); | ||
rightOpenOnStart: true, | ||
topCollapsedHeight: 0, | ||
leftCollapsedWidth: 0, | ||
rightCollapsedWidth: 0, | ||
bottomCollapsedHeight: 0, | ||
mode: 'TBLR' | ||
@@ -2165,0 +2173,0 @@ }; |
{ | ||
"name": "react-drawers", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Collapsible docked panels for React", | ||
"author": "osioalberto@gmail.com", | ||
"license": "MIT", | ||
"repository": "osioalberto/react-drawers", | ||
"repository": "https://github.com/inmagik/react-drawers", | ||
"main": "dist/index.js", | ||
@@ -9,0 +9,0 @@ "module": "dist/index.es.js", |
@@ -94,13 +94,17 @@ # react-drawers | ||
| Property | Type | Description | | ||
| ----------------- | ------ | -------------------------------------------------------------------- | | ||
| top | int | The height of the top drawer | | ||
| left | int | The width of the left drawer | | ||
| right | int | The width of the right drawer | | ||
| bottom | int | The height of the bottom drawer | | ||
| topOpenOnStart | bool | Whether to spawn the top drawer open or closed | | ||
| leftOpenOnStart | bool | Whether to spawn the left drawer open or closed | | ||
| rightOpenOnStart | bool | Whether to spawn the right drawer open or closed | | ||
| bottomOpenOnStart | bool | Whether to spawn the bottom drawer open or closed | | ||
| mode | string | The definition of how to solve the overlapping of drawers, see later | | ||
| Property | Type | Description | | ||
| -------------------- | ------ | -------------------------------------------------------------------- | | ||
| top | int | The height of the top drawer | | ||
| left | int | The width of the left drawer | | ||
| right | int | The width of the right drawer | | ||
| bottom | int | The height of the bottom drawer | | ||
| topOpenOnStart | bool | Whether to spawn the top drawer open or closed | | ||
| leftOpenOnStart | bool | Whether to spawn the left drawer open or closed | | ||
| rightOpenOnStart | bool | Whether to spawn the right drawer open or closed | | ||
| bottomOpenOnStart | bool | Whether to spawn the bottom drawer open or closed | | ||
| topCollapsedWidth | int | The dimension of the top drawer when it is in the collapsed state | | ||
| leftCollapsedWidth | int | The dimension of the left drawer when it is in the collapsed state | | ||
| rightCollapsedWidth | int | The dimension of the right drawer when it is in the collapsed state | | ||
| bottomCollapsedWidth | int | The dimension of the bottom drawer when it is in the collapsed state | | ||
| mode | string | The definition of how to solve the overlapping of drawers, see later | | ||
@@ -107,0 +111,0 @@ The **mode** property is used to define how the drawers overlap when they are open simultaneously. Not all the possible overlappings are currently supported. A mode is any anagram of the word `TLBR`, where `T` stands for `Top`, `L` for `Left` and so on. The earlier the letter appears in the string, the higher the priority of the drawer. The drawer corresponding to the first letter covers all the others, the drawer correponding to the second letter is covered by the first (in case they overlap) but covers the other two, and so on. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
333136
8
3949
188