@coconut-software/ui
Version:
React components for faster and easier web development.
8 lines (7 loc) • 425 B
TypeScript
import type { KeyboardEventHandler, MouseEventHandler, MutableRefObject } from 'react';
interface ForwardClickActions<ElementType> {
handleClick: MouseEventHandler<ElementType>;
handleKeyDown: KeyboardEventHandler<ElementType>;
}
export declare function useForwardClick<ElementType extends HTMLElement>(ref: MutableRefObject<ElementType | null>, selector: string): ForwardClickActions<ElementType>;
export {};