Files
SerpentRace/SerpentRace_Frontend/src/components/PopUp/PopUp.jsx
T

18 lines
531 B
React
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from "react";
export default function PopUp({ children, onClose }) {
return (
<div className="fixed inset-0 bg-black/60 flex items-center justify-center z-50">
<div className="bg-white rounded-xl shadow-lg p-8 min-w-[300px] relative">
<button
onClick={onClose}
className="absolute top-2 right-2 text-gray-500 hover:text-black text-xl font-bold leading-none"
aria-label="Close"
>
×
</button>
{children}
</div>
</div>
);
}