react-confirm-alert 2.6.2 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Readme.md CHANGED
@@ -37,7 +37,8 @@ const options = {
37
37
  willUnmount: () => {},
38
38
  afterClose: () => {}
39
39
  onClickOutside: () => {},
40
- onKeypressEscape: () => {}
40
+ onKeypressEscape: () => {},
41
+ overlayClassName: "overlay-custom-class-name"
41
42
  };
42
43
 
43
44
  confirmAlert(options);
package/index.d.ts CHANGED
@@ -18,6 +18,7 @@ declare module 'react-confirm-alert' {
18
18
  willUnmount?: () => void
19
19
  onClickOutside?: () => void
20
20
  onKeypressEscape?: () => void
21
+ overlayClassName?: string
21
22
  }
22
23
 
23
24
  export function confirmAlert(options: ReactConfirmAlertProps): void
package/lib/index.js CHANGED
@@ -107,13 +107,14 @@ var ReactConfirmAlert = (_temp2 = _class = function (_Component) {
107
107
  message = _props.message,
108
108
  buttons = _props.buttons,
109
109
  childrenElement = _props.childrenElement,
110
- customUI = _props.customUI;
110
+ customUI = _props.customUI,
111
+ overlayClassName = _props.overlayClassName;
111
112
 
112
113
 
113
114
  return _react2.default.createElement(
114
115
  'div',
115
116
  {
116
- className: 'react-confirm-alert-overlay',
117
+ className: 'react-confirm-alert-overlay ' + overlayClassName,
117
118
  ref: function ref(dom) {
118
119
  return _this2.overlay = dom;
119
120
  },
@@ -163,7 +164,8 @@ var ReactConfirmAlert = (_temp2 = _class = function (_Component) {
163
164
  willUnmount: _propTypes2.default.func,
164
165
  afterClose: _propTypes2.default.func,
165
166
  onClickOutside: _propTypes2.default.func,
166
- onKeypressEscape: _propTypes2.default.func
167
+ onKeypressEscape: _propTypes2.default.func,
168
+ overlayClassName: _propTypes2.default.string
167
169
  }, _class.defaultProps = {
168
170
  buttons: [{
169
171
  label: 'Cancel',
@@ -221,7 +223,9 @@ function createSVGBlurReconfirm() {
221
223
 
222
224
  function removeSVGBlurReconfirm(afterClose) {
223
225
  var svg = document.getElementById('react-confirm-alert-firm-svg');
224
- svg.parentNode.removeChild(svg);
226
+ if (svg) {
227
+ svg.parentNode.removeChild(svg);
228
+ }
225
229
  document.body.children[0].classList.remove('react-confirm-alert-blur');
226
230
  afterClose();
227
231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-confirm-alert",
3
- "version": "2.6.2",
3
+ "version": "2.7.0",
4
4
  "description": "react component confirm dialog.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {