2024-06-20 15:58:25: merge [main:a39b20a9abadaa7a1dcdae02bb3f7bb325686d26];
This commit is contained in:
1 parent
6b782f3538
commit
1e3a0edb7d
7 files changed
+80
-19
No files matched your search
@@ -13,7 +13,8 @@ const Modal = ({
|
||||
footer,
|
||||
title,
|
||||
children,
|
||||
onClose = () => {}
|
||||
onClose = () => {},
|
||||
loading = false
|
||||
}: ModalPropsType) => {
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
if (event.key === 'Escape') {
|
||||
@@ -49,10 +50,10 @@ const Modal = ({
|
||||
<div className="modal__content">{children}</div>
|
||||
{footer && (
|
||||
<div className="modal__footer">
|
||||
<Button type="default" onClick={closeModal}>
|
||||
<Button type="default" onClick={closeModal} >
|
||||
{footer.onCanselText}
|
||||
</Button>
|
||||
<Button type="primary" onClick={onOk}>
|
||||
<Button type="primary" onClick={onOk} loading={loading}>
|
||||
{footer.onOkText}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -7,4 +7,5 @@ export interface ModalPropsType {
|
||||
title: string
|
||||
children: ReactNode
|
||||
footer?: { onOkText: string; onCanselText: string }
|
||||
loading?: boolean
|
||||
}
|
||||
Reference in new issue
Block a user