set maxHeight for DialogButton. remove from individual buttons
Some checks failed
Create docker images (cloud) / Build, push, and deploy (push) Has been cancelled
Node.js CI / build (postgresql, 18.18, 10) (push) Has been cancelled

This commit is contained in:
Francis Cao 2025-11-04 09:34:37 -08:00
parent 5398cd89fe
commit a6d4519a98
5 changed files with 9 additions and 5 deletions

View file

@ -12,7 +12,6 @@ export function CohortAddButton({ websiteId }: { websiteId: string }) {
label={formatMessage(labels.cohort)}
variant="primary"
width="800px"
height="calc(100dvh - 40px)"
>
{({ close }) => {
return <CohortEditForm websiteId={websiteId} onClose={close} />;

View file

@ -21,7 +21,6 @@ export function CohortEditButton({
variant="quiet"
title={formatMessage(labels.cohort)}
width="800px"
height="calc(100dvh - 40px)"
>
{({ close }) => {
return (

View file

@ -12,7 +12,6 @@ export function SegmentAddButton({ websiteId }: { websiteId: string }) {
label={formatMessage(labels.segment)}
variant="primary"
width="800px"
height="calc(100dvh - 40px)"
>
{({ close }) => {
return <SegmentEditForm websiteId={websiteId} onClose={close} />;

View file

@ -21,7 +21,6 @@ export function SegmentEditButton({
title={formatMessage(labels.segment)}
variant="quiet"
width="800px"
height="calc(100dvh - 40px)"
>
{({ close }) => {
return (

View file

@ -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';
}