xtreme-ui
Version:
Collection of reusable components that can be used in web projects
19 lines • 1.22 kB
TypeScript
import { RefObject } from 'react';
export declare const isClient: boolean;
export declare const win: (Window & typeof globalThis) | undefined;
export declare const doc: Document | undefined;
export declare const localStore: Storage | undefined;
export declare const getCssProperty: (property: string, element: RefObject<HTMLElement>) => string;
export declare const getCssPropertyPx: (property: string, element: RefObject<HTMLElement>) => number;
export declare const getCssPropertyVh: (property: string, element: RefObject<HTMLElement>) => number[];
export declare const getCssPropertyVw: (property: string, element: RefObject<HTMLElement>) => number[];
export declare const setCssProperty: (property: string, value: string, element: RefObject<HTMLElement>) => void | "";
export declare const waitForElement: (selector: string) => Promise<HTMLElement>;
export declare const elementObserver: (cb: ElementObserverCallback, selectors: string[]) => void;
type ElementObserverCallback = (element: HTMLElement, event: keyof typeof EElementObserverEvent, record: MutationRecord) => void;
declare enum EElementObserverEvent {
added = "added",
removed = "removed"
}
export {};
//# sourceMappingURL=domHelper.d.ts.map