diff --git a/types/styled-react-modal/index.d.ts b/types/styled-react-modal/index.d.ts index 48a0d67b32..1177b6bbc7 100644 --- a/types/styled-react-modal/index.d.ts +++ b/types/styled-react-modal/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for styled-react-modal 1.1 +// 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 @@ -9,10 +10,11 @@ import { StyledComponent, AnyStyledComponent, CSSObject, InterpolationFunction } declare const BaseModalBackground: StyledComponent<'div', any>; -interface ModalProps { +export interface ModalProps { children?: React.ReactNode; isOpen: boolean; allowScroll?: boolean; + backgroundProps?: object; afterOpen?: () => void; afterClose?: () => void; beforeOpen?: Promise | (() => void); diff --git a/types/styled-react-modal/styled-react-modal-tests.tsx b/types/styled-react-modal/styled-react-modal-tests.tsx index c72ea7bcb7..903b8232de 100644 --- a/types/styled-react-modal/styled-react-modal-tests.tsx +++ b/types/styled-react-modal/styled-react-modal-tests.tsx @@ -29,6 +29,7 @@ const test2 = ( console.log('Background click!')} onEscapeKeydown={() => console.log('Background click!')} afterOpen={() => console.log('After Open!')}