From fe04b3e2d9576e8a49d8fbb2819d12a4ea24c254 Mon Sep 17 00:00:00 2001 From: mahdi Date: Tue, 19 Jul 2022 09:03:40 +0430 Subject: [PATCH] update App.js, src/components/Modal/index.js, src/components/ReactMonacoEditor/index.js and src/components/Tabbar/index.js --- src/App.js | 4 +- src/components/Modal/index.js | 8 +- src/components/ReactMonacoEditor/index.js | 176 +++++++++++----------- src/components/Tabbar/index.js | 2 +- 4 files changed, 101 insertions(+), 89 deletions(-) diff --git a/src/App.js b/src/App.js index c619ff8..cab10e7 100644 --- a/src/App.js +++ b/src/App.js @@ -7,8 +7,8 @@ function App() { return ( <> - - + {/* */} + {/* */} ); } diff --git a/src/components/Modal/index.js b/src/components/Modal/index.js index 7ba578e..4962e01 100644 --- a/src/components/Modal/index.js +++ b/src/components/Modal/index.js @@ -3,9 +3,12 @@ import React, { useState } from "react"; import Button from "../Button"; import Tabbar from "../Tabbar"; -const Modal = ({ activeTab }) => { +const Modal = ({ activeTab, children }) => { const [openModal, setOpenModal] = useState(false); + // + //
return (
+// +// +// +//
+//
+// +//
+// ); +// } +// } - setLightTheme = () => { - this.setState({ theme: "vs-light" }); - }; +// const ReactMonacoEditor = () => { +// return ( +//
+//

Monaco Editor Sample (controlled mode)

+// +//
+//

Another editor (uncontrolled mode)

+// {/* */} +//
+//

Another editor (showing a diff)

+// {/* */} +//
+// ); +// }; - render() { - const { code, theme } = this.state; - const options = { - selectOnLineNumbers: true, - roundedSelection: false, - readOnly: false, - cursorStyle: "line", - automaticLayout: false, - }; - return ( -
-
- - - - -
-
- -
- ); - } -} +// export default ReactMonacoEditor; + +import React from "react"; const ReactMonacoEditor = () => { - return ( -
-

Monaco Editor Sample (controlled mode)

- -
-

Another editor (uncontrolled mode)

- {/* */} -
-

Another editor (showing a diff)

- {/* */} -
- ); + return
ReactMonacoEditor
; }; export default ReactMonacoEditor; diff --git a/src/components/Tabbar/index.js b/src/components/Tabbar/index.js index abd259b..085be59 100644 --- a/src/components/Tabbar/index.js +++ b/src/components/Tabbar/index.js @@ -11,7 +11,7 @@ const Tabbar = ({ tabs }) => { const [activeTab, setActiveTab] = useState(); return ( -
+
{tabs.map((tab, index) => (