fix: modal styles

This commit is contained in:
gofnnp 2023-10-26 23:13:40 +04:00
parent 1fc35e973d
commit 5b856aea74
2 changed files with 14 additions and 12 deletions

View File

@ -1,13 +1,13 @@
.modal { .modal {
background: rgba(85,84,85,.8); background: rgba(85,84,85,.8);
height: calc(100% + 76px); height: 100vh;
left: 0;
margin-inline: 50%;
overflow: hidden;
position: fixed; position: fixed;
top: -76px; left: 0;
-webkit-transform: translate(-50%); top: 0;
transform: translate(-50%); /* margin-inline: 50%; */
/* overflow: scroll; */
/* -webkit-transform: translate(-50%);
transform: translate(-50%); */
width: 100vw; width: 100vw;
z-index: 2000; z-index: 2000;
} }
@ -17,11 +17,13 @@
background: #fff; background: #fff;
width: 100%; width: 100%;
max-width: 375px; max-width: 375px;
max-height: calc(100vh - 200px);
overflow: scroll;
top: 50%; top: 50%;
left: 50%; left: 50%;
z-index: 3; z-index: 3;
border-radius: 16px; border-radius: 16px;
padding: 64px 24px; padding: 64px 24px 16px;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
} }

View File

@ -11,7 +11,7 @@ import {
GooglePayBanner, GooglePayBanner,
// GooglePayButton, // GooglePayButton,
// CardButton, // CardButton,
CardModal, // CardModal,
} from "./methods"; } from "./methods";
import ErrorModal from "./ErrorModal"; import ErrorModal from "./ErrorModal";
import UserHeader from "../UserHeader"; import UserHeader from "../UserHeader";
@ -26,7 +26,7 @@ import { StripeButton, StripeModal } from "./methods/Stripe";
function PaymentPage(): JSX.Element { function PaymentPage(): JSX.Element {
const { t } = useTranslation(); const { t } = useTranslation();
const { applePay } = usePayment(); const { applePay } = usePayment();
const [openCardModal, setOpenCardModal] = useState(false); // const [openCardModal, setOpenCardModal] = useState(false);
const [openStripeModal, setOpenStripeModal] = useState(false); const [openStripeModal, setOpenStripeModal] = useState(false);
const [openErrorModal, setOpenErrorModal] = useState(false); const [openErrorModal, setOpenErrorModal] = useState(false);
const dispatch = useDispatch(); const dispatch = useDispatch();
@ -83,12 +83,12 @@ function PaymentPage(): JSX.Element {
), ),
})} })}
</p> </p>
<CardModal {/* <CardModal
open={openCardModal} open={openCardModal}
onClose={() => setOpenCardModal(false)} onClose={() => setOpenCardModal(false)}
onSuccess={onSuccess} onSuccess={onSuccess}
onError={onError} onError={onError}
/> /> */}
<StripeModal <StripeModal
open={openStripeModal} open={openStripeModal}
onClose={() => setOpenStripeModal(false)} onClose={() => setOpenStripeModal(false)}