UNPKG

chonky

Version:

A File Browser component for React

30 lines (29 loc) 915 B
/** * @author Timur Kuzhagaliyev <tim.kuzh@gmail.com> * @copyright 2020 * @license MIT */ import React from 'react'; export interface MouseClickEvent { altKey: boolean; ctrlKey: boolean; shiftKey: boolean; } export declare type MouseClickEventHandler = (event: MouseClickEvent) => void; export interface KeyboardClickEvent { enterKey: boolean; spaceKey: boolean; altKey: boolean; ctrlKey: boolean; shiftKey: boolean; } export declare type KeyboardClickEventHandler = (event: KeyboardClickEvent) => void; export interface ClickableWrapperProps { wrapperTag: any; passthroughProps?: any; onSingleClick?: MouseClickEventHandler; onDoubleClick?: MouseClickEventHandler; onKeyboardClick?: KeyboardClickEventHandler; setFocused?: (focused: boolean) => void; } export declare const ClickableWrapper: React.FC<ClickableWrapperProps>;