findbyview
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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());
 * ```
 */

Readme

Keywords

none

Package Sidebar

Install

npm i findbyview

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

2.38 kB

Total Files

3

Last publish

Collaborators

  • der_googler