1.0.2 • Published 2 years ago

findbyview v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

findByView

/**
 * @param id Given element or ref
 * @param callback HTMLElement or React.RefObject
 *
 * @description
 * Usage
 * ```ts
 * // Id's
 * new findByView("element", (element: HTMLElement) => { element.style.display = "none" })
 *
 * // Refs
 * new findByView(this.myRef, (ref: HTMLElement) => { ref.style.display = "none" })
 *
 * // Get direclty
 * new findByView("element").get?.addEventListener("click", () => thisArgument.click());
 * ```
 */