Skip to content

Commit 48f78a8

Browse files
output window change in code
1 parent 31c6797 commit 48f78a8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

client/src/components/CodeInput/CodeInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const CodeInput = ({ testInput, setTestInput, setToggled }) => {
99

1010
return (
1111
<div
12-
className={`flex flex-col justify-end w-1/2 md:w-full bg-gray-100 h-64 ${
12+
className={` sm:border flex flex-col justify-end w-1/2 md:w-full bg-gray-100 h-64 ${
1313
toggleInputBar ? "md:h-16" : "md:h-1/3"
1414
}`}>
1515
<button

client/src/components/CodeOutput/CodeOutput.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import TextareaAutosize from "react-textarea-autosize";
44
const CodeOutput = ({ output, toggled, status }) => {
55
return (
66
<div
7-
className={`flex flex-col bg-gray-100 p-4 h-64 w-1/2 md:w-full ${
7+
className={`flex flex-col overflow-hidden bg-gray-100 p-4 h-64 w-1/2 md:w-full ${
88
toggled ? "md:h-full" : "md:h-4/6"
99
}`}>
1010
<label className="flex text-xl border-b-2 border-gray-200 pb-4 font-semibold text-gray-600">
@@ -18,13 +18,11 @@ const CodeOutput = ({ output, toggled, status }) => {
1818
</span>
1919
)}
2020
</label>
21-
22-
<TextareaAutosize
23-
className="w-full min-h-full max-h-screen p-2 "
24-
style={{ fontFamily: "Consolas, monaco, monospace" }}
25-
value={output}
26-
disabled
27-
/>
21+
<div className="w-full h-full flex flex-col p-2 overflow-y-auto">
22+
{output.split("\r\n").map((line, index) => (
23+
<samp key={index}>{line}</samp>
24+
))}
25+
</div>
2826
</div>
2927
);
3028
};

0 commit comments

Comments
 (0)