@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
11 lines (10 loc) • 490 B
TypeScript
export type TargetSelector = string;
export type RootElement = Element;
/**
* getPreviousSibling traverses down the DOM tree until it finds the wanted element
*
* @param {string} selector CSS selector name (HTML class name or selector or tag name with upper case chars, like BUTTON)
* @param {Element} element The element to begin with
* @return {Element} Found element
*/
export declare const getPreviousSibling: (selector: TargetSelector, element: RootElement) => Element | null;