Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/styled-react-modal

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/styled-react-modal

TypeScript definitions for styled-react-modal

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.6K
increased by13.63%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

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

Summary

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

Details

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

index.d.ts

// Type definitions for styled-react-modal 1.2
// Project: https://github.com/AlexanderRichey/styled-react-modal
// Definitions by: Greg Perlman <https://github.com/gperl27>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9

import * as React from "react";
import { AnyStyledComponent, CSSObject, InterpolationFunction, StyledComponent } from "styled-components";

declare const BaseModalBackground: StyledComponent<"div", any>;

export interface ModalProps {
    children?: React.ReactNode | undefined;
    isOpen: boolean;
    allowScroll?: boolean | undefined;
    backgroundProps?: object | undefined;
    afterOpen?: (() => void) | undefined;
    afterClose?: (() => void) | undefined;
    beforeOpen?: Promise<void> | (() => void) | undefined;
    beforeClose?: Promise<void> | (() => void) | undefined;
    onEscapeKeydown?: ((event: Event) => void) | undefined;
    onBackgroundClick?: ((event: React.MouseEvent<HTMLDivElement>) => void) | undefined;
}

declare class Modal extends React.Component<ModalProps> {
    static styled(
        object: CSSObject | InterpolationFunction<any>,
    ): StyledComponent<React.ComponentClass<ModalProps>, any>;
    static styled(
        strings: TemplateStringsArray,
        ...interpolations: any[]
    ): StyledComponent<React.ComponentClass<ModalProps>, any>;
}

interface ModalProviderProps {
    backgroundComponent?: AnyStyledComponent | undefined;
    children: React.ReactNode;
}

declare class ModalProvider extends React.Component<ModalProviderProps> {}

export default Modal;
export { BaseModalBackground, ModalProvider };

Additional Details

Credits

These definitions were written by Greg Perlman.

FAQs

Package last updated on 25 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc