mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
Refactor modal components: update styling in ConnectionModal and TopUpModal for improved responsiveness, including adjustments to padding and margins for better compatibility with safe area insets on mobile devices.
This commit is contained in:
@@ -342,16 +342,16 @@ export default function ConnectionModal({ onClose }: ConnectionModalProps) {
|
|||||||
// Modal wrapper - centered on all devices
|
// Modal wrapper - centered on all devices
|
||||||
const ModalWrapper = ({ children }: { children: React.ReactNode }) => (
|
const ModalWrapper = ({ children }: { children: React.ReactNode }) => (
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-black/70 z-[60] flex items-center justify-center p-4"
|
className="fixed inset-0 bg-black/70 z-[60] flex items-center justify-center"
|
||||||
style={{
|
|
||||||
paddingTop: 'calc(1rem + env(safe-area-inset-top, 0px))',
|
|
||||||
paddingBottom: 'calc(1rem + env(safe-area-inset-bottom, 0px))',
|
|
||||||
}}
|
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="w-full max-w-sm bg-dark-900 rounded-2xl border border-dark-700/50 overflow-hidden animate-scale-in shadow-2xl"
|
className="w-[calc(100%-2rem)] max-w-sm bg-dark-900 rounded-2xl border border-dark-700/50 overflow-hidden animate-scale-in shadow-2xl flex flex-col"
|
||||||
style={{ maxHeight: 'calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))' }}
|
style={{
|
||||||
|
maxHeight: 'calc(100dvh - 4rem)',
|
||||||
|
marginTop: 'env(safe-area-inset-top, 0px)',
|
||||||
|
marginBottom: 'env(safe-area-inset-bottom, 0px)',
|
||||||
|
}}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -166,15 +166,15 @@ export default function TopUpModal({ method, onClose, initialAmountRubles }: Top
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-black/70 z-[60] flex items-start sm:items-center justify-center p-4 overflow-y-auto"
|
className="fixed inset-0 bg-black/70 z-[60] flex items-center justify-center"
|
||||||
style={{
|
|
||||||
paddingTop: 'calc(2rem + env(safe-area-inset-top, 0px))',
|
|
||||||
paddingBottom: 'calc(6rem + env(safe-area-inset-bottom, 0px))',
|
|
||||||
}}
|
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="relative w-full max-w-sm bg-dark-900 rounded-2xl border border-dark-700/50 shadow-2xl overflow-hidden animate-scale-in"
|
className="w-[calc(100%-2rem)] max-w-sm bg-dark-900 rounded-2xl border border-dark-700/50 shadow-2xl overflow-hidden animate-scale-in"
|
||||||
|
style={{
|
||||||
|
marginTop: 'env(safe-area-inset-top, 0px)',
|
||||||
|
marginBottom: 'env(safe-area-inset-bottom, 0px)',
|
||||||
|
}}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
|
|||||||
Reference in New Issue
Block a user