From a148f11c193d35ba489f887ed393aedf58a1c714 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 30 Jul 2023 20:52:13 +0800 Subject: ... --- .../src/views/common/dialog/DialogContainer.tsx | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 FrontEnd/src/views/common/dialog/DialogContainer.tsx (limited to 'FrontEnd/src/views/common/dialog/DialogContainer.tsx') diff --git a/FrontEnd/src/views/common/dialog/DialogContainer.tsx b/FrontEnd/src/views/common/dialog/DialogContainer.tsx new file mode 100644 index 00000000..b0a87ea5 --- /dev/null +++ b/FrontEnd/src/views/common/dialog/DialogContainer.tsx @@ -0,0 +1,68 @@ +import { ComponentProps, Ref, ReactNode } from "react"; +import classNames from "classnames"; + +import { ThemeColor, Text, useC } from "../common"; +import { ButtonRow } from "../button"; + +import "./DialogContainer.css"; + +interface DialogContainerProps { + className?: string; + title: Text; + titleColor?: ThemeColor; + titleClassName?: string; + titleRef?: Ref; + bodyContainerClassName?: string; + bodyContainerRef?: Ref; + buttons: ComponentProps["buttons"]; + buttonsClassName?: string; + buttonsContainerRef?: ComponentProps["containerRef"]; + children: ReactNode; +} + +export default function DialogContainer({ + className, + title, + titleColor, + titleClassName, + titleRef, + bodyContainerClassName, + bodyContainerRef, + buttons, + buttonsClassName, + buttonsContainerRef, + children, +}: DialogContainerProps) { + const c = useC(); + + return ( +
+
+ {c(title)} +
+
+
+ {children} +
+
+ +
+ ); +} -- cgit v1.2.3