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.
import * as React from "react";
import {
AnyStyledComponent,
CSSObject,
InterpolationFunction,
StyledComponent,
ThemedStyledFunctionBase,
} from "styled-components";
export 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?: (() => void | Promise<void>) | undefined;
beforeClose?: (() => void | Promise<void>) | undefined;
onEscapeKeydown?: ((event: React.KeyboardEvent) => void) | undefined;
onBackgroundClick?: ((event: React.MouseEvent) => void) | undefined;
}
export interface ModalProviderProps {
children: React.ReactNode;
backgroundComponent?: AnyStyledComponent | undefined;
}
export class ModalProvider extends React.Component<ModalProviderProps> {}
export default class StyledReactModel extends React.Component<ModalProps> {
static styled: (
...args: Parameters<ThemedStyledFunctionBase<"div", any>>
) => typeof StyledReactModel;
}
Additional Details
Credits
These definitions were written by Greg Perlman.