UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

14 lines (13 loc) 575 B
import { KeyboardEvent, KeyboardEventHandler, MouseEvent } from "react"; declare const accessibleOnClick: <T extends Element, Y extends { onKeyDown?: KeyboardEventHandler<T>; onKeyUp?: KeyboardEventHandler<T>; tabIndex?: number | undefined; }>(props: Y, onClick?: (event: MouseEvent<T> | KeyboardEvent<T>) => void) => { onClick: (event: MouseEvent<T> | KeyboardEvent<T>) => void; role: string; tabIndex: number; onKeyDown: (e: KeyboardEvent<T>) => void; onKeyUp: (e: KeyboardEvent<T>) => void; } | undefined; export default accessibleOnClick;