mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-08 17:35:18 +00:00
plan loading message dialog
This commit is contained in:
1 parent
69f931f2a1
commit
9b5ae1cd8b
4 files changed
+230
-182
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Dialog, Portal } from "@chakra-ui/react";
|
||||
|
||||
function LoadingDialog() {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsLoading(true);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Dialog.Root open={isLoading}>
|
||||
<Dialog.Trigger />
|
||||
<Portal>
|
||||
<Dialog.Backdrop />
|
||||
<Dialog.Positioner>
|
||||
<Dialog.Content>
|
||||
<Dialog.CloseTrigger />
|
||||
<Dialog.Header>
|
||||
<Dialog.Title />
|
||||
</Dialog.Header>
|
||||
<Dialog.Body>Example text</Dialog.Body>
|
||||
<Dialog.Footer />
|
||||
</Dialog.Content>
|
||||
</Dialog.Positioner>
|
||||
</Portal>
|
||||
</Dialog.Root>
|
||||
);
|
||||
}
|
||||
|
||||
export default LoadingDialog;
|
||||
Reference in new issue
Block a user