fix: create modal sizing

This commit is contained in:
2026-03-21 22:20:41 +01:00
parent 5360bb51c4
commit b2f73a0b95
3 changed files with 8 additions and 5 deletions

View File

@@ -34,16 +34,19 @@ export function Modal({ isOpen, onClose, title, children, className }: ModalProp
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4">
<div className="absolute inset-0" onClick={onClose} />
<div className="absolute inset-0" onClick={onClose} aria-label="Close" />
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
className={cn(
'relative w-full max-w-md rounded-lg border border-border bg-canvas p-6 shadow-xl',
className
)}
>
<div className="mb-4 flex items-center justify-between">
<h3 className="text-lg font-semibold text-primary">{title}</h3>
<button onClick={onClose} className="text-muted hover:text-primary">
<h3 id="modal-title" className="text-lg font-semibold text-primary">{title}</h3>
<button onClick={onClose} className="text-muted hover:text-primary" aria-label="Close modal">
×
</button>
</div>