@@ -5,26 +5,35 @@ import { LeanMonacoOptions } from 'lean4monaco'
5
5
6
6
function App ( ) {
7
7
const [ options , setOptions ] = useState < LeanMonacoOptions > ( { websocket : { url : 'ws://localhost:8080/' } , vscode : { "workbench.colorTheme" : "Visual Studio Light" } } )
8
+ const [ numberEditors , setNumberEditors ] = useState ( 1 )
8
9
9
10
return (
10
11
< >
11
- < button
12
- onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "workbench.colorTheme" : "Visual Studio Light" } } ) } }
13
- data-cy = "theme-light"
14
- > Light</ button >
15
- < button
16
- onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "workbench.colorTheme" : "Visual Studio Dark" } } ) } }
17
- data-cy = "theme-dark"
18
- > Dark</ button >
19
- < button
20
- onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "lean4.input.leader" : "\\" } } ) } }
21
- data-cy = "leader-backslash"
22
- > Input Leader "\"</ button >
23
- < button
24
- onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "lean4.input.leader" : "," } } ) } }
25
- data-cy = "leader-comma"
26
- > Input Leader ","</ button >
27
- < LeanMonacoComponent options = { options } />
12
+ < div className = "controls" >
13
+ < button
14
+ onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "workbench.colorTheme" : "Visual Studio Light" } } ) } }
15
+ data-cy = "theme-light"
16
+ > Light</ button >
17
+ < button
18
+ onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "workbench.colorTheme" : "Visual Studio Dark" } } ) } }
19
+ data-cy = "theme-dark"
20
+ > Dark</ button >
21
+ < button
22
+ onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "lean4.input.leader" : "\\" } } ) } }
23
+ data-cy = "leader-backslash"
24
+ > Input Leader "\"</ button >
25
+ < button
26
+ onClick = { ( ) => { setOptions ( { ...options , vscode : { ...options . vscode , "lean4.input.leader" : "," } } ) } }
27
+ data-cy = "leader-comma"
28
+ > Input Leader ","</ button >
29
+ < input type = "number" min = "1" max = "3"
30
+ value = { numberEditors }
31
+ onChange = { ( event ) => {
32
+ setNumberEditors ( parseInt ( event . target . value ) ) ;
33
+ } }
34
+ />
35
+ </ div >
36
+ < LeanMonacoComponent options = { options } numberEditors = { numberEditors } />
28
37
</ >
29
38
)
30
39
}
0 commit comments