1
0
mirror of https://github.com/vercel/commerce.git synced 2025-07-30 13:41:22 +00:00
Files
.vscode
assets
components
config
docs
framework
lib
click-outside
click-outside.tsx
has-parent.js
index.ts
is-in-dom.js
hooks
colors.ts
defaults.ts
focus-trap.tsx
get-slug.ts
range-map.ts
search.tsx
to-pixels.ts
usage-warns.ts
pages
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
commerce/lib/click-outside/has-parent.js
2020-12-02 13:16:30 -03:00

6 lines
148 B
JavaScript

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