MSP-3430 add loading props

This commit is contained in:
mikheikinnv committed 2024-06-19 16:07:09 +03:00
1 parent ff73ccf9b1
commit b9805dc7a4
1 file changed
+4 -3
+4 -3
View File
@@ -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>