From 6bba2e449fbb2056cf47f6666373794d7eb57d76 Mon Sep 17 00:00:00 2001 From: Wadad Parker Date: Fri, 12 Jan 2024 00:50:18 +0530 Subject: [PATCH 1/6] style: modal structure --- .../ConversationCard/ConversationCard.jsx | 8 ++++ src/components/modals/FileSharingModal.jsx | 41 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/components/modals/FileSharingModal.jsx diff --git a/src/components/ConversationCard/ConversationCard.jsx b/src/components/ConversationCard/ConversationCard.jsx index afd0ffd..89213ad 100644 --- a/src/components/ConversationCard/ConversationCard.jsx +++ b/src/components/ConversationCard/ConversationCard.jsx @@ -4,9 +4,11 @@ import { useState, useEffect } from "react"; import styles from "./styles.module.css"; import MessageBox from "../messageBox/MessageBox"; import Skeleton from "@mui/material/Skeleton"; +import FileSharingModal from "../modals/FileSharingModal"; const ConversationCards = ({ loading }) => { const [text, settext] = useState(""); + const [showModal,setShowModal] = useState(false); const changeSelectedText = (markup) => { const textarea = document.getElementById("textAreaConversationCard"); @@ -92,6 +94,8 @@ const ConversationCards = ({ loading }) => { }); return ( + <> + { showModal && }
{ >
+ {/* Open modal here */} { height="30" rx="15" fill="#571F6A" + onClick={()=>setShowModal(true)} /> {
+ ); }; export default ConversationCards; diff --git a/src/components/modals/FileSharingModal.jsx b/src/components/modals/FileSharingModal.jsx new file mode 100644 index 0000000..2b077bc --- /dev/null +++ b/src/components/modals/FileSharingModal.jsx @@ -0,0 +1,41 @@ +import React, { useState } from 'react' + + + +const FileSharingModal = ({setShowModal}) => { + const [fileName,setFileName] = useState(""); + return ( +
+
+ setShowModal(false)} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"> + + +

Share a File

+ + + + + + +
+
+ ) +} + +export default FileSharingModal \ No newline at end of file From e72315754f1c982b6a87d7544c0bafc485235529 Mon Sep 17 00:00:00 2001 From: Wadad Parker Date: Fri, 12 Jan 2024 00:58:32 +0530 Subject: [PATCH 2/6] feat: add pdf file --- src/components/modals/FileSharingModal.jsx | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/components/modals/FileSharingModal.jsx b/src/components/modals/FileSharingModal.jsx index 2b077bc..aca2688 100644 --- a/src/components/modals/FileSharingModal.jsx +++ b/src/components/modals/FileSharingModal.jsx @@ -1,9 +1,26 @@ import React, { useState } from 'react' +const Attachment = ({file, setFile}) => +{ + return ( +
+ +
+ ) +} const FileSharingModal = ({setShowModal}) => { - const [fileName,setFileName] = useState(""); + const [file,setFile] = useState(""); return (
@@ -11,15 +28,18 @@ const FileSharingModal = ({setShowModal}) => {

Share a File

+ + - + +