Skip to content

Commit fed8d4c

Browse files
committed
Fixed maximize button on Panel.
1 parent 795a1ca commit fed8d4c

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pm2.yml
3232
.vscode
3333
.tool-versions
3434
.claude
35+
.agents
3536
tmpclaude*
3637
nul
3738

src/app/(main)/websites/[websiteId]/(reports)/journeys/Journey.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export function Journey({ websiteId, steps, startStep, endStep, view }: JourneyP
236236
<div>{formatLongNumber(nodeCount)}</div>
237237
</Focusable>
238238
<Tooltip placement="top" offset={20} showArrow>
239-
<Text transform="lowercase" color="red-700">
239+
<Text transform="lowercase" color="red">
240240
{`${dropped}% ${formatMessage(labels.dropoff)}`}
241241
</Text>
242242
<Column>

src/components/common/Panel.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
Heading,
66
Icon,
77
Row,
8-
Text,
98
Tooltip,
109
TooltipTrigger,
1110
} from '@umami/react-zen';
@@ -20,15 +19,23 @@ export interface PanelProps extends ColumnProps {
2019

2120
const fullscreenStyles = {
2221
position: 'fixed',
23-
width: '100%',
24-
height: '100%',
22+
width: '100vw',
23+
height: '100vh',
2524
top: 0,
2625
left: 0,
2726
border: 'none',
2827
zIndex: 9999,
2928
} as any;
3029

31-
export function Panel({ title, allowFullscreen, style, children, ...props }: PanelProps) {
30+
export function Panel({
31+
title,
32+
allowFullscreen,
33+
style,
34+
children,
35+
height,
36+
width,
37+
...props
38+
}: PanelProps) {
3239
const { formatMessage, labels } = useMessages();
3340
const [isFullscreen, setIsFullscreen] = useState(false);
3441

@@ -46,7 +53,7 @@ export function Panel({ title, allowFullscreen, style, children, ...props }: Pan
4653
position="relative"
4754
gap
4855
{...props}
49-
style={{ ...style, ...(isFullscreen ? fullscreenStyles : {}) }}
56+
style={{ ...style, ...(isFullscreen ? fullscreenStyles : { height, width }) }}
5057
>
5158
{title && <Heading>{title}</Heading>}
5259
{allowFullscreen && (

0 commit comments

Comments
 (0)