From 35808f92e6ed0f54b832024022c89a71658fdb2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Macio=C5=82ek?= Date: Sun, 7 Apr 2024 21:45:49 +0200 Subject: [PATCH] text area added --- src/App.tsx | 2 ++ src/components/Editor.tsx | 22 ++++++++++++++++++++++ src/index.css | 10 ++++++++++ 3 files changed, 34 insertions(+) create mode 100644 src/components/Editor.tsx diff --git a/src/App.tsx b/src/App.tsx index a5f8c0f..06f4d6c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import FilesContext from "./FilesContext"; import FileTab from "./components/TopBar"; import OpenedFile from "./types/OpenedFile"; +import Editor from "./components/Editor"; function App() { const [files, setFiles] = useState([ @@ -51,6 +52,7 @@ function App() {
+
); diff --git a/src/components/Editor.tsx b/src/components/Editor.tsx new file mode 100644 index 0000000..03bb0cb --- /dev/null +++ b/src/components/Editor.tsx @@ -0,0 +1,22 @@ +import { ChangeEvent, useState } from "react"; + +function Editor() { + const [code, setCode] = useState("// Start coding here..."); + + const handleChange = (event: ChangeEvent) => { + setCode(event.target.value); + }; + + return ( +
+