Adding Click Outside

This commit is contained in:
Belen Curcio
2020-12-02 13:16:30 -03:00
parent c37ed3d418
commit 6020d5cfd2
5 changed files with 107 additions and 45 deletions

View File

@@ -0,0 +1,5 @@
import isInDOM from './is-in-dom'
export default function hasParent(element, root) {
return root && root.contains(element) && isInDOM(element)
}