react-modern-drawer
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,3 +5,3 @@ import * as React from 'react'; | ||
open: boolean; | ||
onClose: () => void; | ||
onClose?: () => void; | ||
direction: 'left' | 'right' | 'top' | 'bottom'; | ||
@@ -12,2 +12,3 @@ children?: React.ReactNode; | ||
overlayColor?: String; | ||
enableOverlay?: boolean; | ||
style?: React.CSSProperties; | ||
@@ -14,0 +15,0 @@ zIndex?: number; |
@@ -72,2 +72,4 @@ var React = require('react'); | ||
style = _ref.style, | ||
_ref$enableOverlay = _ref.enableOverlay, | ||
enableOverlay = _ref$enableOverlay === void 0 ? true : _ref$enableOverlay, | ||
_ref$overlayColor = _ref.overlayColor, | ||
@@ -108,3 +110,3 @@ overlayColor = _ref$overlayColor === void 0 ? '#000' : _ref$overlayColor, | ||
className: className | ||
}, children), React.createElement("label", { | ||
}, children), enableOverlay && React.createElement("label", { | ||
htmlFor: 'EZDrawer__checkbox', | ||
@@ -111,0 +113,0 @@ id: 'EZDrawer__overlay', |
@@ -72,2 +72,4 @@ import { createElement } from 'react'; | ||
style = _ref.style, | ||
_ref$enableOverlay = _ref.enableOverlay, | ||
enableOverlay = _ref$enableOverlay === void 0 ? true : _ref$enableOverlay, | ||
_ref$overlayColor = _ref.overlayColor, | ||
@@ -108,3 +110,3 @@ overlayColor = _ref$overlayColor === void 0 ? '#000' : _ref$overlayColor, | ||
className: className | ||
}, children), createElement("label", { | ||
}, children), enableOverlay && createElement("label", { | ||
htmlFor: 'EZDrawer__checkbox', | ||
@@ -111,0 +113,0 @@ id: 'EZDrawer__overlay', |
{ | ||
"name": "react-modern-drawer", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Creating drawers in react made easy!", | ||
@@ -25,27 +25,27 @@ "author": "Farzin-Firoozi", | ||
"devDependencies": { | ||
"@types/node": "^12.12.38", | ||
"@types/react": "^16.9.27", | ||
"@types/react-dom": "^16.9.7", | ||
"@typescript-eslint/eslint-plugin": "^2.26.0", | ||
"@typescript-eslint/parser": "^2.26.0", | ||
"@types/node": "^17.0.21", | ||
"@types/react": "^17.0.40", | ||
"@types/react-dom": "^17.0.13", | ||
"@typescript-eslint/eslint-plugin": "^5.15.0", | ||
"@typescript-eslint/parser": "^5.15.0", | ||
"babel-eslint": "^10.0.3", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-config-standard-react": "^9.2.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint": "^8.11.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-config-standard": "^16.0.3", | ||
"eslint-config-standard-react": "^11.0.1", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-react": "^7.17.0", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"gh-pages": "^2.2.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-react": "^7.29.4", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"gh-pages": "^3.2.3", | ||
"microbundle-crl": "^0.13.10", | ||
"node-sass": "^5.0.0", | ||
"node-sass": "^7.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.0.4", | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react-scripts": "^3.4.1", | ||
"typescript": "^3.7.5" | ||
"prettier": "^2.6.0", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-scripts": "^5.0.0", | ||
"typescript": "^4.6.2" | ||
}, | ||
@@ -52,0 +52,0 @@ "files": [ |
@@ -21,3 +21,3 @@ # react-modern-drawer | ||
``` | ||
```bash | ||
yarn add react-modern-drawer | ||
@@ -67,3 +67,3 @@ ``` | ||
| open | boolean | yes | false | true , false | Select when to show drawer | | ||
| onClose | function | yes | ( )=>{ } | any executable function | This function is called when clicking on backdrop layer usually used for closing the drawer | | ||
| onClose | function | no | ( )=>{ } | any executable function | This function is called when clicking on backdrop layer usually used for closing the drawer | | ||
| size | number | no | 250 | Any positive Integer | Determines the size of drawer in pixels | | ||
@@ -74,2 +74,3 @@ | style | React.CSSProperties | no | null | Normal stylings | Can be used for inline styles | | ||
| overlayColor | string | no | "#000" | Any color code | Determines the color of overlay | | ||
| enableOverlay | boolean | no | true | true , false | Determines whether to show the overlay | | ||
| zIndex | number | no | 100 | Any positive Integer | Determines the zIndex of drawer | | ||
@@ -76,0 +77,0 @@ | children | React.ReactNode | no | null | Any ReactNode | This is the same as props.children | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24969
247
92