This commit is contained in:
ghassan committed 2026-08-04 11:26:25 +03:00
1 parent d0834df8df
commit 6dc35134fa
171 files changed
+19241 -49

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import type { ReactNode } from 'react'
import { Overlay } from './Overlay'
interface ModalProps {
open: boolean
onClose: () => void
title?: string
children: ReactNode
}
export function Modal({ open, onClose, title, children }: ModalProps) {
return (
<Overlay
open={open}
onClose={onClose}
position="center"
className="w-full max-w-md rounded-lg bg-white p-6 shadow-xl dark:bg-gray-900"
>
{title && <h2 className="mb-4 text-lg font-semibold text-gray-900 dark:text-gray-100">{title}</h2>}
{children}
</Overlay>
)
}