mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Fixed types of onRequestClose argument.
This is defined as being native events, but are actually Synthetic events. See https://github.com/reactjs/react-modal/blob/988f55a277373d119a4c37e7d4cce7e681147326/src/components/ModalPortal.js
This commit is contained in:
Vendored
+1
-1
@@ -68,7 +68,7 @@ declare namespace ReactModal {
|
||||
onAfterClose?(): void;
|
||||
|
||||
/* Function that will be run when the modal is requested to be closed, prior to actually closing. */
|
||||
onRequestClose?(event: (MouseEvent | KeyboardEvent)): void;
|
||||
onRequestClose?(event: (React.MouseEvent | React.KeyboardEvent)): void;
|
||||
|
||||
/* Number indicating the milliseconds to wait before closing the modal. Defaults to zero (no timeout). */
|
||||
closeTimeoutMS?: number;
|
||||
|
||||
@@ -13,7 +13,7 @@ class ExampleOfUsingReactModal extends React.Component {
|
||||
render() {
|
||||
const onAfterOpenFn = () => { };
|
||||
const onAfterCloseFn = () => { };
|
||||
const onRequestCloseFn = () => { };
|
||||
const onRequestCloseFn = (event: React.MouseEvent | React.KeyboardEvent) => { };
|
||||
const customStyle = {
|
||||
overlay: {
|
||||
position: 'fixed',
|
||||
|
||||
Reference in New Issue
Block a user