-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathstudent.component.tsx
More file actions
57 lines (54 loc) · 1.58 KB
/
student.component.tsx
File metadata and controls
57 lines (54 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import React from 'react';
import * as classes from './student.styles';
// Material UI ~ components
import TextareaAutosize from '@material-ui/core/TextareaAutosize';
import Typography from '@material-ui/core/Typography';
// Code Editor
import AceEditor from 'react-ace';
import 'ace-builds/src-noconflict/mode-typescript';
import 'ace-builds/src-noconflict/theme-monokai';
interface Props {
room: string;
log: string;
}
export const StudentComponent: React.FC<Props> = props => {
const { room, log } = props;
const { mainContainer, sessionName, studentBoard, labelTextarea } = classes;
return (
<>
<main className={mainContainer}>
<Typography className={sessionName} variant="body1">
Session name: {room}
</Typography>
<label className={labelTextarea} htmlFor="session">
Content
</label>
<AceEditor
//id="session"
placeholder=""
mode="typescript"
theme="monokai"
name="blah2"
//onChange={(value, e) => handleOnChange(value, e)}
fontSize={14}
showPrintMargin={true}
showGutter={true}
highlightActiveLine={true}
setOptions={{
enableBasicAutocompletion: false,
enableLiveAutocompletion: true,
enableSnippets: false,
showLineNumbers: true,
tabSize: 2,
showPrintMargin: false,
wrap: true,
}}
className={studentBoard}
width="auto"
value={log}
readOnly={true}
/>
</main>
</>
);
};