import React from 'react';
import { Button, Modal } from 'antd';
const App: React.FC = () => {
const [open, setOpen] = React.useState(false);
const [loading, setLoading] = React.useState(true);
const showLoading = () => {
setOpen(true);
setLoading(true);
// Simple loading mock. You should add cleanup logic in real world.
setTimeout(() => {
setLoading(false);
}, 2000);
};
return (
<>
Loading Modal
}
footer={
}
loading={loading}
open={open}
onCancel={() => setOpen(false)}
>
Some contents...
Some contents...
Some contents...
>
);
};
export default App;