Hex Core JS
    Preparing search index...

    Function toClickableProps

    • Provides common props to enable clickability to a typically non-interactive element (e.g. <div>).

      Type Parameters

      • T extends HTMLElement = HTMLElement

      Parameters

      • Optionalfn: (event: MouseEvent<T, MouseEvent> | KeyboardEvent<T>) => void

        The function to call when the element is clicked or the Enter key is pressed on it.

      Returns Pick<React.HTMLAttributes<T>, "onClick" | "onKeyDown" | "role" | "tabIndex">