diff --git a/types/react-modal/index.d.ts b/types/react-modal/index.d.ts index 237c725332..d04a6b5c18 100644 --- a/types/react-modal/index.d.ts +++ b/types/react-modal/index.d.ts @@ -1,11 +1,12 @@ -// Type definitions for react-modal 3.2 +// Type definitions for react-modal 3.6 // Project: https://github.com/reactjs/react-modal // Definitions by: Rajab Shakirov , // Drew Noakes , // Thomas B Homburg , // Tatu Tamminen , // Uwe Wiemer , -// Peter Blazejewicz +// Peter Blazejewicz , +// Justin Powell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -48,6 +49,9 @@ declare namespace ReactModal { /* String className to be applied to the document.body. */ bodyOpenClassName?: string; + /* String className to be applied to the document.html. */ + htmlOpenClassName?: string; + /* String or object className to be applied to the modal content. */ className?: string | Classes; @@ -87,6 +91,9 @@ declare namespace ReactModal { /* Additional aria attributes. */ aria?: Aria; + /* Additional data attributes to be applied to to the modal content in the form of "data-*" */ + data?: any; + /* String indicating the role of the modal, allowing the 'dialog' role to be applied if desired. */ role?: string; diff --git a/types/react-modal/react-modal-tests.tsx b/types/react-modal/react-modal-tests.tsx index 463ac1c7be..8dfd6d35e3 100644 --- a/types/react-modal/react-modal-tests.tsx +++ b/types/react-modal/react-modal-tests.tsx @@ -51,6 +51,10 @@ class ExampleOfUsingReactModal extends React.Component { labelledby: 'labelledby', describedby: 'describedby' }; + const customDataVariables = { + dataOne: 'one', + dataTwo: 'two' + }; return ( this.contentRef = instance} overlayRef={instance => this.overlayRef = instance} >