DefinitelyTyped/react-onclickoutside/index.d.ts
Mohamed Hegazy 66d12d9ada Fix failing packages (#13624)
* 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
2016-12-29 19:26:32 -08:00

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;