react-combo-modal
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -72,3 +72,3 @@ 'use strict'; | ||
value: function globalMouseClick(e) { | ||
if (e.target.className == 'ReactComboModalHolder' || e.target.className == 'ReactComboModalBackground') { | ||
if (e.target.className == this.props.customClassNames.holder || e.target.className == this.props.customClassNames.background) { | ||
this.props.onCloseCallback({ | ||
@@ -97,3 +97,3 @@ open: false | ||
style: this.props.style && this.props.style.background, | ||
className: this.props.customClassNames && this.props.customClassNames.background ? this.props.customClassNames.background : 'ReactComboModalBackground' | ||
className: this.props.customClassNames.background | ||
}, | ||
@@ -104,3 +104,3 @@ _react2.default.createElement( | ||
style: this.props.style && this.props.style.holder, | ||
className: this.props.customClassNames && this.props.customClassNames.holder ? this.props.customClassNames.holder : 'ReactComboModalHolder' | ||
className: this.props.customClassNames.holder | ||
}, | ||
@@ -111,3 +111,3 @@ _react2.default.createElement( | ||
style: this.props.style && this.props.style.modal, | ||
className: this.props.customClassNames && this.props.customClassNames.modal ? this.props.customClassNames.modal : 'ReactComboModal' | ||
className: this.props.customClassNames.modal | ||
}, | ||
@@ -139,6 +139,14 @@ content | ||
Modal.propTypes = { | ||
open: _propTypes2.default.PropTypes.bool.isRequired, | ||
onCloseCallback: _propTypes2.default.PropTypes.func.isRequired, | ||
style: _propTypes2.default.PropTypes.object, | ||
customClassNames: _propTypes2.default.PropTypes.object | ||
open: _propTypes2.default.bool, | ||
onCloseCallback: _propTypes2.default.func.isRequired, | ||
style: _propTypes2.default.object, | ||
customClassNames: _propTypes2.default.object | ||
}; | ||
Modal.defaultProps = { | ||
customClassNames: { | ||
background: 'ReactComboModalBackground', | ||
holder: 'ReactComboModalHolder', | ||
modal: 'ReactComboModal' | ||
} | ||
}; |
{ | ||
"name": "react-combo-modal", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"keywords": "react, modal, react-component", | ||
@@ -9,3 +9,3 @@ "description": "React modal component", | ||
"start": "./node_modules/.bin/webpack-dev-server --config webpack.config.js --hot --progress --colors --port 8081 --open", | ||
"test": "mocha -r mock-local-storage --compilers js:babel-core/register --require ./test/test.js \"test/**/*@(.js|.jsx)\"", | ||
"test": "mocha --compilers js:babel-core/register --require ./test/test.js \"test/**/*@(.js|.jsx)\"", | ||
"prepublish": "rm -rf ./lib && mkdir lib && ./node_modules/.bin/babel Components/Modal.jsx --out-file lib/Modal.jsx && ./node_modules/.bin/babel lib/Modal.jsx", | ||
@@ -35,5 +35,11 @@ "postpublish": "rm -rf ./lib" | ||
"babel-preset-stage-0": "^6.5.0", | ||
"chai": "^4.1.2", | ||
"enzyme": "^3.2.0", | ||
"enzyme-adapter-react-16": "^1.1.0", | ||
"eslint": "^3.19.0", | ||
"eslint-plugin-react": "^6.10.3", | ||
"jsdom": "^11.5.1", | ||
"mocha": "^4.0.1", | ||
"react-hot-loader": "^3.0.0-beta.7", | ||
"sinon": "^4.1.2", | ||
"webpack": "^2.4.1", | ||
@@ -40,0 +46,0 @@ "webpack-dev-server": "^2.4.4" |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
152
0
11083
21