18 lines
714 B
TypeScript
18 lines
714 B
TypeScript
'use client'
|
|
|
|
import React from 'react'
|
|
|
|
export function ModalBase({ title, onClose, children }: { title: string; onClose: () => void; children: React.ReactNode }) {
|
|
return (
|
|
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4">
|
|
<div className="bg-white rounded-xl shadow-xl max-w-lg w-full max-h-[90vh] overflow-y-auto">
|
|
<div className="flex items-center justify-between p-5 border-b border-gray-200">
|
|
<h3 className="text-lg font-semibold">{title}</h3>
|
|
<button onClick={onClose} className="text-gray-400 hover:text-gray-600 text-xl">×</button>
|
|
</div>
|
|
<div className="p-5">{children}</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|