Files
breakpilot-compliance/admin-compliance/app/sdk/rbac/_components/ModalBase.tsx
Sharang Parnerkar d5287f4bdd refactor(admin): split rbac page.tsx into colocated components
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 22:50:55 +02:00

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">&times;</button>
</div>
<div className="p-5">{children}</div>
</div>
</div>
)
}