Skip to content
Snippets Groups Projects
Select Git revision
  • 3e65d8caa6b66f83b6e14ffae50da8f8cf73bdb1
  • main default protected
  • develop
  • revert-00dc9115
  • feat/#14
  • feat/#13
  • feat/#11
  • feat/#9
  • feat/#10
  • feat/#8
10 results

Modal.jsx

Blame
  • Modal.jsx 572 B
    import React from "react";
    
    const Modal = ({ isOpen, onClose, children }) => {
      if (!isOpen) return null;
    
      return (
        <div className="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50">
          <div className="relative w-full max-w-lg p-6 overflow-scroll bg-white rounded-lg h-3/4">
            <button
              className="absolute font-bold text-gray-600 top-2 right-3 hover:text-black"
              onClick={onClose}
            >
              &times;
            </button>
            <div>{children}</div>
          </div>
        </div>
      );
    };
    
    export default Modal;