diff --git a/client/src/components/Modal.tsx b/client/src/components/Modal.tsx
new file mode 100644
index 0000000..c04e704
--- /dev/null
+++ b/client/src/components/Modal.tsx
@@ -0,0 +1,17 @@
+import { ReactNode } from 'react';
+
+const Modal = ({ children, show }: { children: ReactNode; show: boolean }) => {
+ return (
+
+ );
+};
+
+export default Modal;
diff --git a/client/src/components/PopupMessage.tsx b/client/src/components/PopupMessage.tsx
index 1f6f1af..18c2e52 100644
--- a/client/src/components/PopupMessage.tsx
+++ b/client/src/components/PopupMessage.tsx
@@ -1,13 +1,18 @@
import { useEffect, useState } from 'react';
import { FaEllipsisH } from 'react-icons/fa';
+import Modal from './Modal';
const PopupMessage = ({ id }: { id: string }) => {
const [show, setShow] = useState(false);
+ const [showEdit, setShowEdit] = useState(false);
+ const [showDelete, setShowDelete] = useState(false);
useEffect(() => {
const handleClick = (e: any) => {
- console.log(show && e.target.closest('.popup-btn'));
- if ((show && !e.target.closest('.popup-btn') || (e.target.closest('.popup') && !e.target.closest('.popup-btn')))) {
+ if (
+ (show && !e.target.closest('.popup-btn')) ||
+ (e.target.closest('.popup') && !e.target.closest('.popup-btn'))
+ ) {
setShow(false);
}
};
@@ -25,12 +30,45 @@ const PopupMessage = ({ id }: { id: string }) => {
-
+
-
Modifier
-
Supprimer
+
+
+
+ Modifier
+
+
+ Voulez vous vraiment supprimer ce message ?
+
+
+
>
);
};
diff --git a/client/tailwind.config.cjs b/client/tailwind.config.cjs
index fd098cf..c6a6a85 100644
--- a/client/tailwind.config.cjs
+++ b/client/tailwind.config.cjs
@@ -14,6 +14,7 @@ module.exports = {
},
zIndex: {
'100': '100',
+ '1000': '1000',
},
padding: {
'2.5': '0.625rem',