From ee500ebeea983174c7203a67a9b5d79e5d800f53 Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Sun, 26 Dec 2021 15:16:09 +0100 Subject: [PATCH] Better scroll area --- components/REPL/index.tsx | 5 +++-- styles/REPL/REPLComplete.module.css | 6 ++++++ styles/REPL/REPLHistory.module.css | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 styles/REPL/REPLComplete.module.css diff --git a/components/REPL/index.tsx b/components/REPL/index.tsx index 109fdba..c4a92ff 100644 --- a/components/REPL/index.tsx +++ b/components/REPL/index.tsx @@ -1,6 +1,7 @@ import { useRef, useState } from "react"; import REPLInput from "./REPLInput"; import REPLHistory from "./REPLHistory"; +import styles from "../../styles/REPL/REPLComplete.module.css"; const REPL = () => { const [history, manipulateHistory] = useState([]); @@ -12,11 +13,11 @@ const REPL = () => { if (inputRef.current) inputRef.current.focus(); } - return (<> + return (
- ); +
); }; export default REPL; \ No newline at end of file diff --git a/styles/REPL/REPLComplete.module.css b/styles/REPL/REPLComplete.module.css new file mode 100644 index 0000000..d036618 --- /dev/null +++ b/styles/REPL/REPLComplete.module.css @@ -0,0 +1,6 @@ +.container { + overflow-y: auto; + display: flex; + flex-direction: column; + flex-grow: 2; +} \ No newline at end of file diff --git a/styles/REPL/REPLHistory.module.css b/styles/REPL/REPLHistory.module.css index e971129..5367ac8 100644 --- a/styles/REPL/REPLHistory.module.css +++ b/styles/REPL/REPLHistory.module.css @@ -1,5 +1,4 @@ .container { - overflow: auto; display: flex; flex-direction: column-reverse; flex-shrink: 2;