diff options
| author | crupest <crupest@outlook.com> | 2023-07-11 18:45:25 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2023-07-11 18:45:25 +0800 |
| commit | 78f0934815a87573289c8e52af2666ea38c93251 (patch) | |
| tree | 2a46597d7fd5ef64e07e557dfba4a62412e96e16 /FrontEnd/src/views/common/dailog/Dialog.tsx | |
| parent | 82d747f694288db25ebd3f2aef146c8382017158 (diff) | |
| download | timeline-78f0934815a87573289c8e52af2666ea38c93251.tar.gz timeline-78f0934815a87573289c8e52af2666ea38c93251.tar.bz2 timeline-78f0934815a87573289c8e52af2666ea38c93251.zip | |
Fix dialog typo.
Diffstat (limited to 'FrontEnd/src/views/common/dailog/Dialog.tsx')
| -rw-r--r-- | FrontEnd/src/views/common/dailog/Dialog.tsx | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/FrontEnd/src/views/common/dailog/Dialog.tsx b/FrontEnd/src/views/common/dailog/Dialog.tsx deleted file mode 100644 index c755950d..00000000 --- a/FrontEnd/src/views/common/dailog/Dialog.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as React from "react"; -import ReactDOM from "react-dom"; -import { CSSTransition } from "react-transition-group"; - -import "./Dialog.css"; - -export interface DialogProps { - onClose: () => void; - open: boolean; - children?: React.ReactNode; - disableCloseOnClickOnOverlay?: boolean; -} - -export default function Dialog(props: DialogProps): React.ReactElement | null { - const { open, onClose, children, disableCloseOnClickOnOverlay } = props; - - return ReactDOM.createPortal( - <CSSTransition - mountOnEnter - unmountOnExit - in={open} - timeout={300} - classNames="cru-dialog" - > - <div - className="cru-dialog-overlay" - onClick={ - disableCloseOnClickOnOverlay - ? undefined - : () => { - onClose(); - } - } - > - <div - className="cru-dialog-container" - onClick={(e) => e.stopPropagation()} - > - {children} - </div> - </div> - </CSSTransition>, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - document.getElementById("portal")! - ); -} |
