import React from 'react';
import { Button, Drawer } 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 Drawer
}
placement="right"
open={open}
loading={loading}
onClose={() => setOpen(false)}
>
Some contents...
Some contents...
Some contents...
>
);
};
export default App;