@types/styled-react-modal
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -14,12 +14,12 @@ // Type definitions for styled-react-modal 1.2 | ||
export interface ModalProps { | ||
children?: React.ReactNode; | ||
children?: React.ReactNode | undefined; | ||
isOpen: boolean; | ||
allowScroll?: boolean; | ||
backgroundProps?: object; | ||
afterOpen?: () => void; | ||
afterClose?: () => void; | ||
beforeOpen?: Promise<void> | (() => void); | ||
beforeClose?: Promise<void> | (() => void); | ||
onEscapeKeydown?: (event: Event) => void; | ||
onBackgroundClick?: (event: React.MouseEvent<HTMLDivElement>) => void; | ||
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; | ||
} | ||
@@ -38,3 +38,3 @@ | ||
interface ModalProviderProps { | ||
backgroundComponent?: AnyStyledComponent; | ||
backgroundComponent?: AnyStyledComponent | undefined; | ||
children: React.ReactNode; | ||
@@ -41,0 +41,0 @@ } |
{ | ||
"name": "@types/styled-react-modal", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "TypeScript definitions for styled-react-modal", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/styled-react-modal", | ||
"license": "MIT", | ||
@@ -19,3 +20,3 @@ "contributors": [ | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -31,4 +32,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "a2c4caea5a4b9e2cb32541e1061135b6ed6c8532431dccb30fa0414abad9e6aa", | ||
"typeScriptVersion": "2.9" | ||
"typesPublisherContentHash": "f83db0990eaa038deffa8174f8ccef0e518ea2b58749a574f4063ce6d229d1d3", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -5,13 +5,61 @@ # Installation | ||
# Summary | ||
This package contains type definitions for styled-react-modal ( https://github.com/AlexanderRichey/styled-react-modal ). | ||
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 | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/styled-react-modal. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/styled-react-modal/index.d.ts) | ||
````ts | ||
// Type definitions for styled-react-modal 1.2 | ||
// Project: https://github.com/AlexanderRichey/styled-react-modal | ||
// Definitions by: Adam Lavin <https://github.com/Lavoaster> | ||
// Greg Perlman <https://github.com/gperl27> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.9 | ||
Additional Details | ||
* Last updated: Mon, 06 May 2019 08:52:23 GMT | ||
* Dependencies: @types/react, @types/styled-components | ||
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 | 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 | ||
* Last updated: Fri, 02 Jul 2021 22:33:06 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/styled-components](https://npmjs.com/package/@types/styled-components) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Adam Lavin <https://github.com/Lavoaster>, Greg Perlman <https://github.com/gperl27>. | ||
These definitions were written by [Adam Lavin](https://github.com/Lavoaster), and [Greg Perlman](https://github.com/gperl27). |
Sorry, the diff of this file is not supported yet
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6368
0
65