Skip to content

Commit

Permalink
Fixed #1765 - No typing for confirmPopup and confirmDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Jan 27, 2021
1 parent 0babfa1 commit faf1af3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/components/confirmdialog/ConfirmDialog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConfirmDialogProps,any> {}

export function confirmDialog(props: ConfirmDialogProps):any;
8 changes: 6 additions & 2 deletions src/components/confirmdialog/ConfirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions src/components/confirmpopup/ConfirmPopup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ interface ConfirmPopupProps {
dismissable?: boolean;
footer?: any;
onHide?(result: string): void;
accept?(): void;
reject?(): void;
}

export class ConfirmPopup extends React.Component<ConfirmPopupProps,any> {}

export function confirmPopup(props: ConfirmPopupProps):any;
8 changes: 6 additions & 2 deletions src/components/confirmpopup/ConfirmPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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) {
Expand Down

0 comments on commit faf1af3

Please sign in to comment.