Skip to content

Commit 5d2516d

Browse files
committed
improve type
1 parent efe2d0a commit 5d2516d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/DialogWrap.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const DialogWrap: React.FC<IDialogPropTypes> = (props) => {
3131
const onEsc: PortalProps['onEsc'] = ({ top, event }) => {
3232
if (top && keyboard) {
3333
event.stopPropagation();
34-
// @ts-ignore
3534
props.onClose?.(event);
3635
return;
3736
}

src/IDialogPropTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type IDialogPropTypes = {
2222
children?: React.ReactNode;
2323
afterClose?: () => any;
2424
afterOpenChange?: (open: boolean) => void;
25-
onClose?: (e: SyntheticEvent) => any;
25+
onClose?: (e: SyntheticEvent | KeyboardEvent) => any;
2626
closable?: boolean | (ClosableType & React.AriaAttributes);
2727
maskClosable?: boolean;
2828
visible?: boolean;

0 commit comments

Comments
 (0)