Skip to content

Commit cf7b413

Browse files
authored
Add min-height to make sure we hande longer code files (#406)
* Fix drawer height with large files * Also make the log text a better color
1 parent e94f157 commit cf7b413

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/web/src/components/apps/bottom-drawer.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { cn } from '@/lib/utils.ts';
66
import { useLogs } from './use-logs';
77
import { useEffect, useRef } from 'react';
88

9-
const maxHeightInPx = 320;
9+
const DRAWER_HEIGHT = 320;
1010

1111
export default function BottomDrawer() {
1212
const { logs, clearLogs, open, togglePane, closePane } = useLogs();
@@ -60,7 +60,10 @@ export default function BottomDrawer() {
6060
'flex flex-col w-full overflow-hidden transition-all duration-200 ease-in-out',
6161
open ? 'flex-grow' : 'flex-shrink-0 h-8',
6262
)}
63-
style={{ maxHeight: open ? `${maxHeightInPx}px` : '2rem' }}
63+
style={{
64+
maxHeight: open ? `${DRAWER_HEIGHT}px` : '2rem',
65+
minHeight: open ? `${DRAWER_HEIGHT}px` : '2rem',
66+
}}
6467
>
6568
<div className="flex-shrink-0 flex items-center justify-between border-t border-b h-8 px-1 w-full bg-muted">
6669
<button
@@ -112,7 +115,7 @@ export default function BottomDrawer() {
112115
<pre
113116
className={cn('font-mono cursor-text whitespace-pre-wrap', {
114117
'text-red-300': log.type === 'stderr',
115-
'text-tertiary-foreground': log.type === 'info',
118+
'text-secondary-foreground': log.type === 'info',
116119
})}
117120
>
118121
{log.message}

0 commit comments

Comments
 (0)