Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: optimize the type definition of Modal #41742

Merged
merged 7 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export interface ModalProps {
/** 点击模态框右上角叉、取消按钮、Props.maskClosable 值为 true 时的遮罩层或键盘按下 Esc 时的回调 */
onCancel?: (e: React.MouseEvent<HTMLButtonElement>) => void;
afterClose?: () => void;
/** 打开和关闭 Modal 时动画结束后的回调 */
yoyo837 marked this conversation as resolved.
Show resolved Hide resolved
afterOpenChange?: (open: boolean) => void;
/** 垂直居中 */
centered?: boolean;
/** 宽度 */
Expand Down
1 change: 1 addition & 0 deletions components/modal/__tests__/Modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ describe('Modal', () => {
render(<Modal open footer={<div className="custom-footer">footer</div>} />);
expect(document.querySelector('.custom-footer')).toBeTruthy();
});

yoyo837 marked this conversation as resolved.
Show resolved Hide resolved
});