From e8f62a62cb63590016abe3f294cdc58c1f6d2f0f Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Wed, 6 Jul 2022 15:11:41 +0430 Subject: [PATCH] =?UTF-8?q?=D8=A7=D8=AF=D8=A7=D9=85=D9=87=20=DA=A9=D8=A7?= =?UTF-8?q?=D8=B1=20|=2022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/images/white-cancel.svg | 6 +++++ src/components/Card/index.js | 41 +++++--------------------------- src/components/Modal/index.js | 43 ++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 35 deletions(-) create mode 100644 public/images/white-cancel.svg create mode 100644 src/components/Modal/index.js diff --git a/public/images/white-cancel.svg b/public/images/white-cancel.svg new file mode 100644 index 0000000..2e99890 --- /dev/null +++ b/public/images/white-cancel.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/Card/index.js b/src/components/Card/index.js index b98c5b1..7524923 100644 --- a/src/components/Card/index.js +++ b/src/components/Card/index.js @@ -2,19 +2,15 @@ import React, { useState } from "react"; import Button from "../Button"; import CircleInCircle from "../CircleInCircle"; - -import FormInput from "../FormInput"; +import Modal from "../Modal"; const ProcessCard = ({ processes, title, hint, buttons, options }) => { - const [openModal, setOpenModal] = useState(false); - console.log(openModal); - return ( -
+
{/* right */}
{/* top */} -
+
{processes.map((process, index) => (
{ ))}
{/* middle */} -
+

{title}

@@ -42,6 +38,7 @@ const ProcessCard = ({ processes, title, hint, buttons, options }) => {

{/* bottom */}
+ {buttons.map((btn, index) => (
{/* left */} -
+
{options.map((option, j) => (
{
))}
- {/* modal */} -
-
e.stopPropagation()} - > -
-
); }; @@ -128,11 +104,6 @@ ProcessCard.defaultProps = { ], buttons: [ - { - title: "ویرایش", - className: "bg-[#046AE8] text-white", - icon: "images/blue-edit-icon.svg", - }, { title: "سوالات:", className: "border border-[#046AE8] text-[#046AE8]", diff --git a/src/components/Modal/index.js b/src/components/Modal/index.js new file mode 100644 index 0000000..ef25ff9 --- /dev/null +++ b/src/components/Modal/index.js @@ -0,0 +1,43 @@ +import React, { useState } from "react"; + +import Button from "../Button"; +import FormInput from "../FormInput"; + +const Modal = () => { + const [openModal, setOpenModal] = useState(false); + console.log(openModal); + + return ( +
+
+ + + ); +}; + +export default Modal;