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/Button.tsx | 78 +++++++++++++++++++++++++++++++++++++++++++++++ src/components/Dialog.tsx | 56 ++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 src/components/Button.tsx create mode 100644 src/components/Dialog.tsx (limited to 'src/components') diff --git a/src/components/Button.tsx b/src/components/Button.tsx new file mode 100644 index 0000000..7dc64fd --- /dev/null +++ b/src/components/Button.tsx @@ -0,0 +1,78 @@ +import classNames from "classnames"; +import React from "react"; + +type ButtonType = { + buttonText: string; + rounded?: "none" | "md" | "full"; + size?: "sm" | "md" | "lg"; + color?: + | "violet" + | "pink" + | "red" + | "orange" + | "yellow" + | "lime" + | "cyan" + | ""; + disabled?: boolean; +}; + +const Button = ({ + buttonText = "Enabled", + rounded = "none", + size = "md", + color = "cyan", + disabled, +}: ButtonType) => { + return ( + + ); +}; + +export default Button; 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