Skip to content

Commit

Permalink
feat: Improvement style and cosmetic code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stepkos committed May 30, 2024
1 parent 8c4d4bf commit bf3eb88
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
23 changes: 22 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
body {
background-color: #282c34;
}

.cube-scene {
/*width: 800px;*/
height: 600px;
Expand All @@ -22,5 +26,22 @@
font-size: 14px;
font-family: Consolas, monospace;
padding: 10px;
background-color: #f8f8f8;
color: white;
background-color: #343940;
border: 1px solid black;
outline: none;
}

.code-editor textarea:focus {
/*border: none;*/
}

.code-editor button {
margin-top: 10px;
padding: 10px 20px;
font-size: 16px;
background-color: steelblue;
color: white;
border: none;
cursor: pointer;
}
9 changes: 4 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ function App() {
setCode(newCode);
};


return (
<div className="App">
<CubeScene code={code} />
<CodeEditor onExecute={handleExecuteCode} />
</div>
<div className="App">
<CubeScene code={code} />
<CodeEditor onExecute={handleExecuteCode} />
</div>
);
}

Expand Down
1 change: 1 addition & 0 deletions src/components/CubeScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const CubeScene = ({ code }) => {

const animate = () => {
try {
/* eslint-disable no-eval */
eval(code);
} catch (error) {
console.error("Error executing code: ", error);
Expand Down

0 comments on commit bf3eb88

Please # to comment.