react-confirm-alert
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -46,8 +46,4 @@ 'use strict'; | ||
this.close = function () { | ||
var target = document.getElementById('react-confirm-alert'); | ||
var svg = document.getElementById('react-confirm-alert-firm-svg'); | ||
target.parentNode.removeChild(target); | ||
svg.parentNode.removeChild(svg); | ||
var root = document.body.children[0]; | ||
root.classList.remove('react-confirm-alert-blur'); | ||
removeElementReconfirm(); | ||
removeSVGBlurReconfirm(); | ||
}; | ||
@@ -136,3 +132,3 @@ } | ||
function createSVG() { | ||
function createSVGBlurReconfirm() { | ||
var svgNS = 'http://www.w3.org/2000/svg'; | ||
@@ -148,2 +144,3 @@ var feGaussianBlur = document.createElementNS(svgNS, 'feGaussianBlur'); | ||
svgElem.setAttribute('id', 'react-confirm-alert-firm-svg'); | ||
svgElem.setAttribute('class', 'react-confirm-alert-svg'); | ||
svgElem.appendChild(filter); | ||
@@ -154,3 +151,9 @@ | ||
function createElemetReconfirm(properties) { | ||
function removeSVGBlurReconfirm() { | ||
var svg = document.getElementById('react-confirm-alert-firm-svg'); | ||
svg.parentNode.removeChild(svg); | ||
document.body.children[0].classList.remove('react-confirm-alert-blur'); | ||
} | ||
function createElementReconfirm(properties) { | ||
document.body.children[0].classList.add('react-confirm-alert-blur'); | ||
@@ -163,5 +166,11 @@ var divTarget = document.createElement('div'); | ||
function removeElementReconfirm() { | ||
var target = document.getElementById('react-confirm-alert'); | ||
_reactDom.unmountComponentAtNode(target); | ||
target.parentNode.removeChild(target); | ||
} | ||
function confirmAlert(properties) { | ||
createSVG(); | ||
createElemetReconfirm(properties); | ||
createSVGBlurReconfirm(); | ||
createElementReconfirm(properties); | ||
} |
{ | ||
"name": "react-confirm-alert", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "react component confirm dialog.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -15,3 +15,3 @@ # react-confirm-alert | ||
```js | ||
import ReactConfirmAlert, { confirmAlert } from 'react-confirm-alert'; // Import | ||
import { confirmAlert } from 'react-confirm-alert'; // Import | ||
import 'react-confirm-alert/src/react-confirm-alert.css' // Import css | ||
@@ -18,0 +18,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
788
160679