@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
12 lines (11 loc) • 480 B
JavaScript
/*!
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
* v1.5.0-next.4
*/
import { queryElementRoots } from "../../utils/dom";
export function getEffectiveReferenceElement(tooltip) {
const { referenceElement } = tooltip;
return ((typeof referenceElement === "string" ? queryElementRoots(tooltip, { id: referenceElement }) : referenceElement) ||
null);
}