[styled-react-modal] update and export ModalProps interface (#35090)

* add missing prop to styled-react-modal

* fix lint errors
This commit is contained in:
Greg
2019-05-06 01:20:17 -07:00
committed by Wesley Wigham
parent a335769441
commit c8739bc0d6
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -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 <https://github.com/Lavoaster>
// Greg Perlman <https://github.com/gperl27>
// 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> | (() => void);
@@ -29,6 +29,7 @@ const test2 = (
<ModalProvider backgroundComponent={BackgroundComponent}>
<Modal
isOpen={true}
backgroundProps={{style: {padding: "20px"}}}
onBackgroundClick={() => console.log('Background click!')}
onEscapeKeydown={() => console.log('Background click!')}
afterOpen={() => console.log('After Open!')}