MSP-3430 add loading props
This commit is contained in:
1 parent
ff73ccf9b1
commit
b9805dc7a4
1 file changed
+4
-3
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user