add popup, table & chart

This commit is contained in:
CanbiZ
2025-01-30 13:43:24 +01:00
parent e2b548a7c3
commit a38e9070ef
3 changed files with 99 additions and 33 deletions

View File

@@ -0,0 +1,29 @@
"use client";
import React from "react";
interface ModalProps {
isOpen: boolean;
onClose: () => void;
children: React.ReactNode;
}
const Modal: React.FC<ModalProps> = ({ isOpen, onClose, children }) => {
if (!isOpen) return null;
return (
<div className="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50">
<div className="bg-white p-6 rounded-lg shadow-lg w-3/4 max-w-4xl relative">
<button
onClick={onClose}
className="absolute top-2 right-2 bg-red-500 text-white p-1 rounded"
>
</button>
{children}
</div>
</div>
);
};
export default Modal;