Skip to content

Commit 9a11e44

Browse files
committed
website: Update styles.
1 parent b76849d commit 9a11e44

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

website/App.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ body {
1616
}
1717

1818
.App-editor {
19-
height: 220px;
19+
height: 260px;
2020
overflow: auto;
21+
margin-top: 50px !important;
2122
}
2223

2324
.App-tools {
2425
margin-top: 5px;
26+
margin-bottom: 50px !important;
2527
}
2628

2729
.App-tools,

website/App.tsx

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,8 @@ import TextareaCodeEditor from '../';
88
import MDStr from '../README.md';
99
import './App.css';
1010

11-
const codeStr = `import React from "react";
12-
import CodeEditor from '@uiw/react-textarea-code-editor';
13-
import ReactDOM from "react-dom";
14-
15-
function App() {
16-
return (
17-
<CodeEditor
18-
value="console.log('Hello World')"
19-
language="js"
20-
/>
21-
);
22-
}
23-
24-
ReactDOM.render(<App />, document.getElementById("root"));`;
25-
2611
const App: React.FC = () => {
27-
const [value, setValue] = useState(codeStr);
12+
const [value, setValue] = useState('');
2813
const [language, setLanguage] = useState('jsx');
2914
useEffect(() => {
3015
if (language) {
@@ -43,10 +28,10 @@ const App: React.FC = () => {
4328
<h1 className="App-title">React Textarea Code Editor</h1>
4429
<div className="App-editor">
4530
<TextareaCodeEditor
46-
language={language}
47-
value={value}
48-
style={{ backgroundColor: '#fafafa', outline: 0 }}
4931
autoFocus
32+
value={value}
33+
language={language}
34+
style={{ backgroundColor: '#fafafa', outline: 0, fontSize: 14 }}
5035
onChange={(evn) => setValue(evn.target.value)}
5136
/>
5237
</div>

0 commit comments

Comments
 (0)