mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
set maxHeight for DialogButton. remove from individual buttons
This commit is contained in:
parent
5398cd89fe
commit
a6d4519a98
5 changed files with 9 additions and 5 deletions
|
|
@ -12,7 +12,6 @@ export function CohortAddButton({ websiteId }: { websiteId: string }) {
|
||||||
label={formatMessage(labels.cohort)}
|
label={formatMessage(labels.cohort)}
|
||||||
variant="primary"
|
variant="primary"
|
||||||
width="800px"
|
width="800px"
|
||||||
height="calc(100dvh - 40px)"
|
|
||||||
>
|
>
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
return <CohortEditForm websiteId={websiteId} onClose={close} />;
|
return <CohortEditForm websiteId={websiteId} onClose={close} />;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ export function CohortEditButton({
|
||||||
variant="quiet"
|
variant="quiet"
|
||||||
title={formatMessage(labels.cohort)}
|
title={formatMessage(labels.cohort)}
|
||||||
width="800px"
|
width="800px"
|
||||||
height="calc(100dvh - 40px)"
|
|
||||||
>
|
>
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ export function SegmentAddButton({ websiteId }: { websiteId: string }) {
|
||||||
label={formatMessage(labels.segment)}
|
label={formatMessage(labels.segment)}
|
||||||
variant="primary"
|
variant="primary"
|
||||||
width="800px"
|
width="800px"
|
||||||
height="calc(100dvh - 40px)"
|
|
||||||
>
|
>
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
return <SegmentEditForm websiteId={websiteId} onClose={close} />;
|
return <SegmentEditForm websiteId={websiteId} onClose={close} />;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ export function SegmentEditButton({
|
||||||
title={formatMessage(labels.segment)}
|
title={formatMessage(labels.segment)}
|
||||||
variant="quiet"
|
variant="quiet"
|
||||||
width="800px"
|
width="800px"
|
||||||
height="calc(100dvh - 40px)"
|
|
||||||
>
|
>
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,19 @@ export function DialogButton({
|
||||||
...props
|
...props
|
||||||
}: DialogButtonProps) {
|
}: DialogButtonProps) {
|
||||||
const { isMobile } = useMobile();
|
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) {
|
if (isMobile) {
|
||||||
style.width = '100%';
|
style.width = '100%';
|
||||||
style.height = '100%';
|
style.height = '100%';
|
||||||
|
style.maxHeight = '100%';
|
||||||
style.overflowY = 'auto';
|
style.overflowY = 'auto';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue