File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,19 @@ import styles from "./styles.module.css";
12
12
13
13
interface Props {
14
14
children : ReactNode ;
15
- height : string ;
15
+ minHeight ?: string ;
16
+ height ?: string ;
16
17
url ?: string ;
17
18
}
18
19
19
20
export default function BrowserWindow ( {
20
21
children,
22
+ minHeight,
21
23
height,
22
24
url = "http://localhost:3000" ,
23
25
} : Props ) : JSX . Element {
24
26
return (
25
- < div className = { styles . browserWindow } style = { { height } } >
27
+ < div className = { styles . browserWindow } style = { { minHeight , height } } >
26
28
< div className = { styles . browserWindowHeader } >
27
29
< div className = { styles . buttons } >
28
30
< span className = { styles . dot } style = { { background : "#f25f58" } } />
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ export default function IframeOutput({
10
10
} ) {
11
11
return (
12
12
< >
13
- < BrowserWindow height = { height === undefined ? "200px" : height } >
13
+ < BrowserWindow
14
+ height = { height !== undefined && height }
15
+ minHeight = { height === undefined && "200px" }
16
+ >
14
17
< iframe
15
18
width = "100%"
16
19
height = "100%"
You can’t perform that action at this time.
0 commit comments