From a6d4519a980dc301c7675ccf7ab69137b5469351 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Tue, 4 Nov 2025 09:34:37 -0800 Subject: [PATCH] set maxHeight for DialogButton. remove from individual buttons --- .../websites/[websiteId]/cohorts/CohortAddButton.tsx | 1 - .../websites/[websiteId]/cohorts/CohortEditButton.tsx | 1 - .../websites/[websiteId]/segments/SegmentAddButton.tsx | 1 - .../[websiteId]/segments/SegmentEditButton.tsx | 1 - src/components/input/DialogButton.tsx | 10 +++++++++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/(main)/websites/[websiteId]/cohorts/CohortAddButton.tsx b/src/app/(main)/websites/[websiteId]/cohorts/CohortAddButton.tsx index 737ab502..3f7f8723 100644 --- a/src/app/(main)/websites/[websiteId]/cohorts/CohortAddButton.tsx +++ b/src/app/(main)/websites/[websiteId]/cohorts/CohortAddButton.tsx @@ -12,7 +12,6 @@ export function CohortAddButton({ websiteId }: { websiteId: string }) { label={formatMessage(labels.cohort)} variant="primary" width="800px" - height="calc(100dvh - 40px)" > {({ close }) => { return ; diff --git a/src/app/(main)/websites/[websiteId]/cohorts/CohortEditButton.tsx b/src/app/(main)/websites/[websiteId]/cohorts/CohortEditButton.tsx index 48944677..aea02209 100644 --- a/src/app/(main)/websites/[websiteId]/cohorts/CohortEditButton.tsx +++ b/src/app/(main)/websites/[websiteId]/cohorts/CohortEditButton.tsx @@ -21,7 +21,6 @@ export function CohortEditButton({ variant="quiet" title={formatMessage(labels.cohort)} width="800px" - height="calc(100dvh - 40px)" > {({ close }) => { return ( diff --git a/src/app/(main)/websites/[websiteId]/segments/SegmentAddButton.tsx b/src/app/(main)/websites/[websiteId]/segments/SegmentAddButton.tsx index aed63ac6..052d3185 100644 --- a/src/app/(main)/websites/[websiteId]/segments/SegmentAddButton.tsx +++ b/src/app/(main)/websites/[websiteId]/segments/SegmentAddButton.tsx @@ -12,7 +12,6 @@ export function SegmentAddButton({ websiteId }: { websiteId: string }) { label={formatMessage(labels.segment)} variant="primary" width="800px" - height="calc(100dvh - 40px)" > {({ close }) => { return ; diff --git a/src/app/(main)/websites/[websiteId]/segments/SegmentEditButton.tsx b/src/app/(main)/websites/[websiteId]/segments/SegmentEditButton.tsx index 8c025772..6d422c95 100644 --- a/src/app/(main)/websites/[websiteId]/segments/SegmentEditButton.tsx +++ b/src/app/(main)/websites/[websiteId]/segments/SegmentEditButton.tsx @@ -21,7 +21,6 @@ export function SegmentEditButton({ title={formatMessage(labels.segment)} variant="quiet" width="800px" - height="calc(100dvh - 40px)" > {({ close }) => { return ( diff --git a/src/components/input/DialogButton.tsx b/src/components/input/DialogButton.tsx index f7184da6..a3a49252 100644 --- a/src/components/input/DialogButton.tsx +++ b/src/components/input/DialogButton.tsx @@ -33,11 +33,19 @@ export function DialogButton({ ...props }: DialogButtonProps) { const { isMobile } = useMobile(); - const style: CSSProperties = { width, height, minWidth, minHeight, padding: '32px' }; + const style: CSSProperties = { + width, + height, + minWidth, + minHeight, + maxHeight: 'calc(100dvh - 40px)', + padding: '32px', + }; if (isMobile) { style.width = '100%'; style.height = '100%'; + style.maxHeight = '100%'; style.overflowY = 'auto'; }