[react-modal] Added id attribute, as per PR https://github.com/reactjs/react-modal/765 (#42370)

* Added id attribute, as per PR https://github.com/reactjs/react-modal/pull/765

* Updated header

* Pr fixes
This commit is contained in:
nitzanmo 2020-02-18 03:19:50 +02:00 committed by GitHub
parent 9bdc01d75d
commit 13322c9f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@
// Peter Blazejewicz <https://github.com/peterblazejewicz>,
// Justin Powell <https://github.com/jpowell>
// Juwan Wheatley <https://github.com/fiberjw>
// Nitzan Mousan <https://github.com/nitzanmo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@ -125,6 +126,9 @@ declare namespace ReactModal {
/* String value of data-test-id attibute to be applied to to the modal content. */
testId?: string;
/* String value of an id attribute to be applied to the modal content */
id?: string;
}
}

View File

@ -64,6 +64,7 @@ class ExampleOfUsingReactModal extends React.Component {
};
return (
<ReactModal
id="modal-id"
isOpen={true}
onAfterOpen={onAfterOpenFn}
onAfterClose={onAfterCloseFn}