Skip to content

Commit 12e2cfa

Browse files
Adapt OutputPanel layout
1 parent 6a4502f commit 12e2cfa

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/ConsolePanel.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let make = (~logs, ~setLogs) => {
2020
Some(() => Webapi.Window.removeEventListener("message", cb))
2121
}, [])
2222

23-
<div className="px-2 py-6 relative">
23+
<div className="px-2 py-6 relative flex flex-col flex-1 overflow-y-hidden">
2424
<h2 className="font-bold text-gray-5/50 absolute right-2 top-2"> {React.string("Console")} </h2>
2525
{switch logs {
2626
| [] =>
@@ -44,7 +44,7 @@ let make = (~logs, ~setLogs) => {
4444
})
4545
->React.array
4646

47-
<div className="whitespace-pre-wrap p-4 block"> content </div>
47+
<div className="whitespace-pre-wrap p-4 overflow-auto"> content </div>
4848
}}
4949
</div>
5050
}

src/OutputPanel.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@react.component
22
let make = (~runOutput, ~compilerState, ~logs, ~setLogs) => {
3-
<div className="h-full">
3+
<div className="h-full flex flex-col overflow-y-hidden">
44
<RenderPanel runOutput compilerState clearLogs={() => setLogs(_ => [])} />
55
<hr className="border-gray-60" />
66
<ConsolePanel logs setLogs />

src/RenderPanel.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let make = (~compilerState: CompilerManagerHook.state, ~clearLogs, ~runOutput) =
2525
None
2626
}, (compilerState, runOutput))
2727

28-
<div className={`px-2 relative ${validReact ? "h-1/2 py-2" : "h-auto py-6"}`}>
28+
<div className={`px-2 relative ${validReact ? "flex-1 py-2 overflow-y-auto" : "h-auto py-6"}`}>
2929
<h2 className="font-bold text-gray-5/50 absolute right-2 top-2"> {React.string("React")} </h2>
3030
{validReact
3131
? React.null

src/common/EvalIFrame.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ let sendOutput = code => {
8282

8383
@react.component
8484
let make = () => {
85-
<iframe width="100%" id="iframe-eval" className="relative w-full text-gray-20" srcDoc />
85+
<iframe width="100%" id="iframe-eval" className="relative h-full w-full text-gray-20" srcDoc />
8686
}

0 commit comments

Comments
 (0)