mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Use correct cases for type reference * Add missing dependency on jquery * Switch to module and add tslint * Fix failing test * Fix triple-slash reference * Remove reference to `__React` * Add import for react-native * Add missing react import * Switch to module * Switch to module, add react import * Make sure test is resilient to lib changes
28 lines
955 B
TypeScript
28 lines
955 B
TypeScript
// Type definitions for react-onclickoutside v5.7.0
|
|
// Project: https://github.com/Pomax/react-onclickoutside
|
|
// Definitions by: Karol Janyst <https://github.com/LKay>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
import * as React from "react";
|
|
|
|
declare namespace ReactOnClickOutside {
|
|
interface OnClickOutsideComponent {
|
|
handleClickOutside(e: React.MouseEvent<any>): void
|
|
}
|
|
|
|
interface OnClickOutsideProps {
|
|
disableOnClickOutside?: boolean | Function
|
|
enableOnClickOutside?: Function
|
|
eventTypes?: string | Array<string>
|
|
outsideClickIgnoreClass?: string
|
|
preventDefault?: boolean
|
|
stopPropagation?: boolean
|
|
}
|
|
|
|
interface onClickOutside {
|
|
<A>(component: React.ComponentClass<A> | React.StatelessComponent<A>): React.ComponentClass<A & OnClickOutsideProps>
|
|
}
|
|
}
|
|
|
|
declare const onClickOutside: ReactOnClickOutside.onClickOutside
|
|
export = onClickOutside; |