From 5eae6349c42f06e876ed07d57551aaccac862f53 Mon Sep 17 00:00:00 2001 From: Ololade Sanya Date: Mon, 22 Jul 2024 10:13:12 +0100 Subject: [PATCH 1/2] created modal component and Create role Modal Form --- .../CreateRoleFormModal/CreateRoleForm.tsx | 105 ++++++++++++++++++ .../CreateRoleFormModal/CreateRoleModal.tsx | 23 ++++ 2 files changed, 128 insertions(+) create mode 100644 app/components/CreateRoleFormModal/CreateRoleForm.tsx create mode 100644 app/components/CreateRoleFormModal/CreateRoleModal.tsx diff --git a/app/components/CreateRoleFormModal/CreateRoleForm.tsx b/app/components/CreateRoleFormModal/CreateRoleForm.tsx new file mode 100644 index 00000000..fc462aa7 --- /dev/null +++ b/app/components/CreateRoleFormModal/CreateRoleForm.tsx @@ -0,0 +1,105 @@ +import { FC, useState } from "react"; +import { Form } from "@remix-run/react"; +import CreateRoleModal from "./CreateRoleModal"; + +interface CreateRoleFormProperties { + isOpen: boolean; + onClose: () => void; +} + +const CreateRoleForm: FC = ({ isOpen, onClose }) => { + const [roleName, setRoleName] = useState(""); + const [roleDescription, setRoleDescription] = useState(""); + + const handleSubmit = (event: React.FormEvent) => { + event.preventDefault(); + // Handle form submission logic here + onClose(); + }; + + return ( + +
+
+

Create Role

+ +
+

+ Define customized responsibilities for collaborative success. +

+
+
+ + setRoleName(event.target.value)} + className="w-[50%] rounded-md border border-border p-2 text-sm font-normal text-[#525252]" + required + /> +
+
+ +