refactoring styling

This commit is contained in:
2026-02-20 09:21:23 -07:00
parent c224a6a9e2
commit ca240811f2
2 changed files with 8 additions and 3 deletions

View File

@@ -42,6 +42,7 @@ export default function Modal({
modalWidth = "w-1/3",
modalControl,
buttonComponent,
backgroundCoverColor = "bg-black/80",
}: {
children: (props: { closeModal: () => void }) => ReactNode;
buttonText?: string;
@@ -49,6 +50,7 @@ export default function Modal({
modalWidth?: string;
modalControl: ModalControl;
buttonComponent?: (props: { openModal: () => void }) => ReactNode;
backgroundCoverColor?: string;
}) {
return (
<>
@@ -66,7 +68,7 @@ export default function Modal({
<div
className={
modalControl.isOpen
? `transition-all duration-400 fixed inset-0 ${modalControl.position ? "" : "flex items-center justify-center"} h-screen bg-black/80 z-50 w-screen`
? `transition-all duration-400 fixed inset-0 ${modalControl.position ? "" : "flex items-center justify-center"} h-screen ${backgroundCoverColor} z-50 w-screen`
: "hidden h-0 w-0 p-1 -z-50"
}
onClick={modalControl.closeModal}