From 18be2308873c50936c08d254ebb20afe1bdc318a Mon Sep 17 00:00:00 2001 From: Nikita Tchayka Date: Tue, 29 Aug 2023 23:31:42 +0100 Subject: Update --- src/components/Dialog.tsx | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/components/Dialog.tsx (limited to 'src/components/Dialog.tsx') diff --git a/src/components/Dialog.tsx b/src/components/Dialog.tsx new file mode 100644 index 0000000..0258e88 --- /dev/null +++ b/src/components/Dialog.tsx @@ -0,0 +1,56 @@ +import React from "react"; +import Button from "./Button"; +import classNames from "classnames"; + +type DialogType = { + message: string; + width?: "fit" | "full" | "1/2" | "1/3"; + cancelButtonText?: string; + actionButtonText?: string; + actionButtonColor?: + | "violet" + | "pink" + | "red" + | "orange" + | "yellow" + | "lime" + | "cyan"; +}; + +const Dialog = ({ + message, + width, + cancelButtonText, + actionButtonText, + actionButtonColor, +}: DialogType) => { + return ( +
+
+

{message}

+
+ {cancelButtonText && ( + + )} + {actionButtonText && ( +
+
+
+ ); +}; + +export default Dialog; -- cgit