Pin phone sheets to the visible viewport, and let people correct login and organizer errors.

This commit is contained in:
adilallo committed 2026-11-11 17:01:44 -07:00
1 parent 27d74e510c
commit 39807ef452
17 files changed
+236 -16

No files matched your search

@@ -33,6 +33,8 @@ export type CreateModalFrameViewProps = {
presentation?: CreateModalPresentationValue;
/** Visible viewport height so a phone sheet footer rides above the keyboard. */
viewportHeight?: number;
/** `visualViewport.offsetTop`, so the sheet tracks the visible region on iOS. */
viewportOffsetTop?: number;
};
/**
@@ -51,6 +53,7 @@ export function CreateModalFrameView({
belowCard,
presentation = "dialog",
viewportHeight,
viewportOffsetTop,
}: CreateModalFrameViewProps) {
if (!isOpen) return null;
@@ -65,7 +68,12 @@ export function CreateModalFrameView({
: "flex min-h-0 max-h-[90vh] w-full max-w-[560px] shrink-0 flex-col overflow-hidden rounded-[var(--radius-500)] bg-[var(--color-surface-default-primary)] shadow-[0px_0px_48px_0px_rgba(0,0,0,0.1)] z-[9999]";
const overlayStyle =
isSheet && viewportHeight != null
? { height: viewportHeight, maxHeight: viewportHeight }
? {
top: viewportOffsetTop ?? 0,
bottom: "auto" as const,
height: viewportHeight,
maxHeight: viewportHeight,
}
: undefined;
const content = (