Fix modals taller than the viewport being unscrollable (#425)

This commit is contained in:
Ben Senescu 2026-07-26 08:30:20 -07:00 committed by GitHub
parent be6a34e766
commit 72c1cf0b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,14 +25,14 @@ export function Modal({
}, [onClose]); }, [onClose]);
return ( return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50"> <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4">
<div <div
role="dialog" role="dialog"
aria-modal="true" aria-modal="true"
aria-labelledby={labelledBy} aria-labelledby={labelledBy}
className={`card bg-base-100 border border-base-300 w-full ${maxWidth} shadow-xl`} className={`card bg-base-100 border border-base-300 w-full ${maxWidth} max-h-full shadow-xl`}
> >
<div className="card-body gap-4">{children}</div> <div className="card-body gap-4 overflow-y-auto">{children}</div>
</div> </div>
</div> </div>
); );