mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 05:20:24 +08:00
26 lines
922 B
TypeScript
26 lines
922 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
|
|
|
|
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; |