1.3.3 • Published 6 months ago

@types/react-outside-click-handler v1.3.3

Weekly downloads
52,339
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/react-outside-click-handler

Summary

This package contains type definitions for react-outside-click-handler (https://github.com/airbnb/react-outside-click-handler).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-outside-click-handler.

index.d.ts

// Type definitions for react-outside-click-handler 1.3
// Project: https://github.com/airbnb/react-outside-click-handler
// Definitions by: Ivan Zub <https://github.com/zubivan>
//                 JadowityHerbatnik <https://github.com/JadowityHerbatnik>
//                 Adam Jones <https://github.com/domdomegg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9

import * as React from "react";

export interface DefaultProps {
    disabled: boolean;
    useCapture: boolean;
    display: "block" | "flex" | "inline" | "inline-block" | "contents";
}

// TODO: Remove partial once DT support TS 3.0, so skipping mandatory listed in default props won't result in compile error
export interface Props extends Partial<DefaultProps> {
    children: React.ReactNode;
    onOutsideClick: (e: MouseEvent) => void;
}

export default class OutsideClickHandler extends React.Component<Props> {
    static defaultProps: DefaultProps;
}

Additional Details

  • Last updated: Thu, 23 Dec 2021 22:01:19 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Ivan Zub, JadowityHerbatnik, and Adam Jones.