This commit is contained in:
2024-08-16 15:32:30 +07:00
parent 766ab9c2fe
commit 1082557479
2 changed files with 7 additions and 6 deletions

View File

@@ -25,14 +25,15 @@ body,
/* Popup Styling */ /* Popup Styling */
.popup { .popup {
position: fixed; position: fixed;
top: 0; top: 50%;
left: 0; left: 50%;
width: 100%; width: 600px;
height: 600px; height: 600px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 1000; z-index: 1000;
transform: translate(-50%, -50%);
} }
.popup.hidden { .popup.hidden {

View File

@@ -3,7 +3,6 @@ import {ReactFlow, addEdge, Controls, Background, MarkerType } from '@xyflow/re
import '@xyflow/react/dist/style.css'; import '@xyflow/react/dist/style.css';
import { FiUser, FiMail, FiCheckCircle,FiList } from 'react-icons/fi'; import { FiUser, FiMail, FiCheckCircle,FiList } from 'react-icons/fi';
import {FaShuffle } from "react-icons/fa6"; import {FaShuffle } from "react-icons/fa6";
import { event } from 'jquery';
const initialNode = { const initialNode = {
@@ -200,6 +199,7 @@ const NoteFlow = () => {
const hideenPopup = () => { const hideenPopup = () => {
setShowPopup(false); setShowPopup(false);
console.log('hide')
} }
const onConnect = (params) => setEdges((eds) => addEdge(params, eds)); const onConnect = (params) => setEdges((eds) => addEdge(params, eds));
@@ -269,7 +269,7 @@ const NoteFlow = () => {
)} )}
{showPopup && ( {showPopup && (
<> <>
<div className="popup-overlay" onClick={hideenPopup}></div> <button className="popup-overlay" onClick={hideenPopup}></button>
<div <div
className={`popup global-popup ${showPopup ? '' : 'hidden'}`} className={`popup global-popup ${showPopup ? '' : 'hidden'}`}
> >
@@ -277,7 +277,7 @@ const NoteFlow = () => {
<div className="conent-form"> <div className="conent-form">
<form> <form>
<div dangerouslySetInnerHTML={{ __html: selectedNodeContent }} /> <div dangerouslySetInnerHTML={{ __html: selectedNodeContent }} />
<button onClick={() => setShowPopup(false)}>Close</button> <button onClick={hideenPopup}>Close</button>
</form> </form>
</div> </div>
</div> </div>