12 lines
402 B
TypeScript
12 lines
402 B
TypeScript
"use client"
|
|
|
|
export default function Modal({ children, onClose }: { children: React.ReactNode; onClose: () => void }) {
|
|
return (
|
|
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50" onClick={onClose}>
|
|
<div className="bg-white rounded-xl p-6 max-w-md w-full mx-4" onClick={(e) => e.stopPropagation()}>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|