concis
Version:
Concis Component library for PC
7 lines (6 loc) • 602 B
TypeScript
import { RefObject, RefCallback } from 'react';
declare function on(el: any, eventName: string, handler: EventListener | EventListenerObject | Function, options?: boolean): () => void;
declare function off(el: any, eventName: string, handler: EventListener | EventListenerObject | Function, options?: boolean): () => void;
declare function onClickOutSide(el: RefObject<HTMLElement> | HTMLElement, handler: EventListener): () => void;
declare function dispatchRef<T>(ref: RefCallback<T> | RefObject<HTMLElement | null>, componentElement: T): void;
export { on, off, onClickOutSide, dispatchRef };