@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 551 B
Source Map (JSON)
{"version":3,"file":"find-element-ancestor.mjs","names":[],"sources":["../../../../src/core/utils/find-element-ancestor/find-element-ancestor.ts"],"sourcesContent":["/* eslint-disable no-empty */\nexport function findElementAncestor(element: HTMLElement, selector: string) {\n let _element: HTMLElement | null = element;\n while ((_element = _element.parentElement) && !_element.matches(selector)) {}\n return _element;\n}\n"],"mappings":";;AACA,SAAgB,oBAAoB,SAAsB,UAAkB;CAC1E,IAAI,WAA+B;AACnC,SAAQ,WAAW,SAAS,kBAAkB,CAAC,SAAS,QAAQ,SAAS;AACzE,QAAO"}