From faf1af32f0344782f61e3362376b70bb52f77ceb Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 27 Jan 2021 11:26:16 +0300 Subject: [PATCH] Fixed #1765 - No typing for confirmPopup and confirmDialog --- src/components/confirmdialog/ConfirmDialog.d.ts | 4 ++++ src/components/confirmdialog/ConfirmDialog.js | 8 ++++++-- src/components/confirmpopup/ConfirmPopup.d.ts | 4 ++++ src/components/confirmpopup/ConfirmPopup.js | 8 ++++++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/components/confirmdialog/ConfirmDialog.d.ts b/src/components/confirmdialog/ConfirmDialog.d.ts index af7de70c41..64a2eb39b8 100644 --- a/src/components/confirmdialog/ConfirmDialog.d.ts +++ b/src/components/confirmdialog/ConfirmDialog.d.ts @@ -15,6 +15,10 @@ interface ConfirmDialogProps extends DialogProps { className?: string; footer?: any; onHide?(result: string): void; + accept?(): void; + reject?(): void; } export class ConfirmDialog extends React.Component {} + +export function confirmDialog(props: ConfirmDialogProps):any; diff --git a/src/components/confirmdialog/ConfirmDialog.js b/src/components/confirmdialog/ConfirmDialog.js index ec3a3fdeec..429c0b0911 100644 --- a/src/components/confirmdialog/ConfirmDialog.js +++ b/src/components/confirmdialog/ConfirmDialog.js @@ -57,7 +57,9 @@ export class ConfirmDialog extends Component { className: null, appendTo: null, footer: null, - onHide: null + onHide: null, + accept: null, + reject: null } static propTypes = { @@ -73,7 +75,9 @@ export class ConfirmDialog extends Component { appendTo: PropTypes.any, className: PropTypes.string, footer: PropTypes.any, - onHide: PropTypes.func + onHide: PropTypes.func, + accept: PropTypes.func, + reject: PropTypes.func } constructor(props) { diff --git a/src/components/confirmpopup/ConfirmPopup.d.ts b/src/components/confirmpopup/ConfirmPopup.d.ts index 9227510563..d1fde4a9f2 100644 --- a/src/components/confirmpopup/ConfirmPopup.d.ts +++ b/src/components/confirmpopup/ConfirmPopup.d.ts @@ -17,6 +17,10 @@ interface ConfirmPopupProps { dismissable?: boolean; footer?: any; onHide?(result: string): void; + accept?(): void; + reject?(): void; } export class ConfirmPopup extends React.Component {} + +export function confirmPopup(props: ConfirmPopupProps):any; diff --git a/src/components/confirmpopup/ConfirmPopup.js b/src/components/confirmpopup/ConfirmPopup.js index 302f29c552..e9a7840e7e 100644 --- a/src/components/confirmpopup/ConfirmPopup.js +++ b/src/components/confirmpopup/ConfirmPopup.js @@ -62,7 +62,9 @@ export class ConfirmPopup extends Component { appendTo: null, dismissable: true, footer: null, - onHide: null + onHide: null, + accept: null, + reject: null } static propTypes = { @@ -81,7 +83,9 @@ export class ConfirmPopup extends Component { appendTo: PropTypes.any, dismissable: PropTypes.bool, footer: PropTypes.any, - onHide: PropTypes.func + onHide: PropTypes.func, + accept: PropTypes.func, + reject: PropTypes.func } constructor(props) {