mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 10:27:49 +00:00
Update styling in ConnectionModal and TopUpModal: enhance layout with consistent padding and improved responsiveness for mobile devices, ensuring better compatibility with safe area insets.
This commit is contained in:
@@ -345,19 +345,21 @@ export default function ConnectionModal({ onClose }: ConnectionModalProps) {
|
|||||||
// Modal wrapper - top aligned with auto-focus
|
// Modal wrapper - top aligned with auto-focus
|
||||||
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-start justify-center"
|
className="fixed inset-0 bg-black/70 z-[60] flex items-start justify-center p-4 pt-8 overflow-hidden"
|
||||||
style={{ paddingTop: `calc(2rem + env(safe-area-inset-top, 0px))` }}
|
style={{
|
||||||
|
paddingTop: `max(2rem, calc(1rem + env(safe-area-inset-top, 0px)))`,
|
||||||
|
paddingBottom: `max(1rem, env(safe-area-inset-bottom, 0px))`,
|
||||||
|
}}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
ref={modalContentRef}
|
ref={modalContentRef}
|
||||||
data-modal-content
|
data-modal-content
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
className="w-[calc(100%-2rem)] max-w-sm bg-dark-900 rounded-2xl border border-dark-700/50 overflow-y-auto overscroll-contain animate-scale-in shadow-2xl flex flex-col outline-none"
|
className="w-full max-w-sm bg-dark-900 rounded-2xl border border-dark-700/50 overflow-y-auto overscroll-contain animate-scale-in shadow-2xl flex flex-col outline-none"
|
||||||
style={{
|
style={{
|
||||||
maxHeight: 'calc(100dvh - 6rem)',
|
maxHeight: `calc(100vh - 4rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))`,
|
||||||
WebkitOverflowScrolling: 'touch',
|
WebkitOverflowScrolling: 'touch',
|
||||||
touchAction: 'pan-y',
|
|
||||||
}}
|
}}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -171,14 +171,16 @@ export default function TopUpModal({ method, onClose, initialAmountRubles }: Top
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-black/70 z-[60] flex items-start justify-center"
|
className="fixed inset-0 bg-black/70 z-[60] flex items-start justify-center p-4 pt-8 overflow-hidden"
|
||||||
style={{ paddingTop: `calc(2rem + env(safe-area-inset-top, 0px))` }}
|
style={{
|
||||||
|
paddingTop: `max(2rem, calc(1rem + env(safe-area-inset-top, 0px)))`,
|
||||||
|
paddingBottom: `max(1rem, env(safe-area-inset-bottom, 0px))`,
|
||||||
|
}}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
data-modal-content
|
data-modal-content
|
||||||
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"
|
className="w-full max-w-sm bg-dark-900 rounded-2xl border border-dark-700/50 shadow-2xl overflow-hidden animate-scale-in"
|
||||||
style={{ touchAction: 'pan-y' }}
|
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
|
|||||||
Reference in New Issue
Block a user