@types/react-modal-view
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Installation

npm install --save @types/react-modal-view

Summary

This package contains type definitions for react-modal-view (https://github.com/StevenIseki/react-modal-view).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-modal-view.

index.d.ts

import { Component, ReactNode } from "react";

export interface ModalProps {
    /** Modal contents */
    children?: ReactNode | undefined;
    /** Whether or not the modal should be visible */
    visible?: boolean | undefined;
    /** Whether or not the modal is closable */
    closable?: boolean | undefined;

    /** Called when the modal is shown */
    onShow?: (() => void) | undefined;
    /** Called when the modal is hidden */
    onHide?: (() => void) | undefined;
}

export default class Modal extends Component<ModalProps> {
    /**
     * Doesn't seem to be used anywhere.
     * Not actually assignable to ModalProps
     */
    static get defaultProps(): { type: "notice"; message: null };

    handleBeforeComponentUpdate(props: ModalProps): void;

    handleComponentUpdate(prevProps: ModalProps, prevState: { visible: boolean }): void;

    handleCloseBtnClick(e: MouseEvent): void;

    handleOverlayClick(e: MouseEvent): void;

    toggleVisibility(): void;

    show(): void;

    hide(): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Adam Thompson-Sharpe.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-modal-view

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

4.76 kB

Total Files

5

Last publish

Collaborators

  • types