// Type definitions for styled-react-modal 1.2 // Project: https://github.com/AlexanderRichey/styled-react-modal // Definitions by: Adam Lavin // Greg Perlman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 import * as React from 'react'; import { StyledComponent, AnyStyledComponent, CSSObject, InterpolationFunction } from 'styled-components'; declare const BaseModalBackground: StyledComponent<'div', any>; export interface ModalProps { children?: React.ReactNode; isOpen: boolean; allowScroll?: boolean; backgroundProps?: object; afterOpen?: () => void; afterClose?: () => void; beforeOpen?: Promise | (() => void); beforeClose?: Promise | (() => void); onEscapeKeydown?: (event: Event) => void; onBackgroundClick?: (event: React.MouseEvent) => void; } declare class Modal extends React.Component { static styled( object: CSSObject | InterpolationFunction ): StyledComponent, any>; static styled( strings: TemplateStringsArray, ...interpolations: any[] ): StyledComponent, any>; } interface ModalProviderProps { backgroundComponent?: AnyStyledComponent; children: React.ReactNode; } declare class ModalProvider extends React.Component {} export default Modal; export { BaseModalBackground, ModalProvider };