Duffer Derek
'use client';
import React from 'react';
import { X } from 'lucide-react';
interface ModalProps {
children: React.ReactNode;
onClose: () => void;
}
const Modal: React.FC<ModalProps> = ({ children, onClose }) => {
return (
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div className="bg-white p-6 rounded-lg shadow-lg relative w-full max-w-md mx-auto">
<button onClick={onClose} className="absolute top-2 right-2 text-gray-500 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" aria-label="Close modal">
<X size={20} />
</button>
{children}
</div>
</div>
);
};
export default Modal;
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists